📲
HC Mobile App UI Docs
  • Introduction
  • Foundations
    • Colors
    • Icons
    • Layout Primitives
    • Theming
  • Typography
    • Heading
    • Text
    • Custom Fonts
  • Components
    • Accordion
    • Avatar
    • Bottom Sheet
    • Button
    • Button Group
    • Card List
    • Card List Item
    • Checkbox
    • Chip
    • Date Picker
    • Divider
    • Expandable Card
    • Floater
    • Horizontal List
    • Icon
    • Icon Toggle
    • Link
    • List Header
    • Lower Prompt
    • Nestable List
    • Pill Toggle
    • Radio
    • Select Picker
    • Selectable List
    • Text Input
    • Tiles
  • Utilities
    • Device Utilities
    • Layout Utilities
  • Resources
    • Issues
    • Changelog
    • GitHub
Powered by GitBook
On this page
  1. Foundations

Layout Primitives

PreviousIconsNextTheming

Last updated 3 years ago

CtrlK
  • Major Scale
  • Minor Scale

To maintain consistent spacing throughout the app, layouts should adhere to only using two metric units namely major and minor.

Major Scale

1 unit of major scale is equal to 11px. MAU provides a utility function that allows you to use the major scale and its multiples in your design.

Usage

import { majorScale } from 'hc-mobile-app-ui';

// Single Unit
margin-top: majorScale(1); // i.e. 11*1

// Multiple Units
margin-top: majorScale(4); // i.e. 11*4

Minor Scale

1 unit of minor scale is equal to 5px. MAU provides a utility function that allows you to use the minor scale and its multiples in your design.

Usage

import { minorScale } from 'hc-mobile-app-ui';

// Single Unit
margin-top: minorScale(1); // i.e. 5*1

// Multiple Units
margin-top: minorScale(4); // i.e. 5*4