Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Foundations

    Spacing

    Every distance between elements comes from spacing tokens on a 4-pixel grid. The same tokens are used for padding, gaps between elements and gaps between sections.

    The spacing scale has thirteen steps from 2 to 56 pixels. The first steps (2, 4, 6) are for tight relations such as an icon and its text; after that the scale grows in multiples of 4. The scale does not depend on brand or mode: every brand keeps the same rhythm.

    In Tailwind the spacing tokens back utilities such as p-*, m-* and gap-*: p-lg gives 12 pixels of padding, gap-md an 8-pixel gap.

    TokenValuePreview
    --bigbang-space-none0px
    --bigbang-space-xxs

    Icon and its text

    2px
    --bigbang-space-xs

    Label and help text

    4px
    --bigbang-space-sm6px
    --bigbang-space-md

    Inline items, button groups

    8px
    --bigbang-space-lg

    Padding inside a form field

    12px
    --bigbang-space-xl

    Between form fields

    16px
    --bigbang-space-2xl20px
    --bigbang-space-3xl

    Card padding

    24px
    --bigbang-space-4xl32px
    --bigbang-space-5xl

    Between page sections

    40px
    --bigbang-space-6xl48px
    --bigbang-space-7xl56px

    Related elements sit close together, unrelated ones further apart. In a form, a label and its field are xs apart, two fields xl, two form sections 4xl. The larger the gap, the weaker the relation; readers see the groups without needing lines.

    Merchant screens are mostly tables and forms. Table rows default to md padding, cards and panels to 3xl. On mobile the horizontal page margin is xl (16 pixels); on desktop the content grid uses 3xl and above.

    gap-md px-lg py-md
    DoA token changes everywhere at once if the scale changes.
    gap-[7px] px-[13px]
    Don'tArbitrary values break the rhythm and leave the scale.
    DoRelated fields close, sections apart: the groups read on their own.
    Don'tWith equal gaps everywhere it is unclear which field a label belongs to.