Skip to main content
ENKO

Spacing

Spacing makes content easier to read and shows which elements belong together. All values come from tokens — no custom numbers.

Spacing is the cheapest way to make a dense financial screen legible and the easiest thing to get wrong, because every individual deviation looks harmless. The scale below is closed: if a value is not on it, it is not available.

Spacing scale

Based on a 4px base unit. Components and layouts use only values from this scale.

TokenValuepx
space-000
--ds-space-10.25rem4
--ds-space-20.5rem8
--ds-space-30.75rem12
--ds-space-41rem16
--ds-space-51.5rem24
--ds-space-62rem32
--ds-space-72.5rem40
--ds-space-83rem48
--ds-space-94rem64
--ds-space-106rem96

Why the scale goes non-linear at 5

Steps 1–4 increase by 4px. From step 5 the scale jumps to 24, 32, 40, 48, 64, 96. This is deliberate: small spacing distinguishes parts of one thing and needs fine resolution, while large spacing separates different things and needs obvious difference. A 28px gap and a 32px gap are indistinguishable to a reader, so the scale does not offer both.

The consequence is that there is no 20px. Anything that wants 20px is either a 16px relationship or a 24px one, and forcing that choice is the point.

Values are rem, not px

Every step is defined in rem, so the entire layout scales with the user's browser and OS text size. A user at 125% text size gets 125% spacing, which keeps the rhythm intact instead of cramming larger text into fixed gaps.

Do / Don't
Do
Send request
Cancel

12px gap between stacked buttons. Each action is visually distinct.

Don't
Send request
Cancel

0px gap merges buttons together. Hard to distinguish separate actions.

Spacing scale
space-1
4px / 0.25rem
space-2
8px / 0.5rem
space-3
12px / 0.75rem
space-4
16px / 1rem
space-5
24px / 1.5rem
space-6
32px / 2rem
space-7
40px / 2.5rem
space-8
48px / 3rem
space-9
64px / 4rem
space-10
96px / 6rem

Where to use each token

Each spacing token has a specific role. Previews use redline annotations — red-tinted areas with boundary lines marking the exact spacing value.

TokenPxUsage in Senco
space-14Badge dot to label, icon gap inside tight components
space-28Inline button group gap (Money/Crypto tabs), FormField internal gap (label → input → helper)
space-312Transaction row internal padding, compact list item padding
space-416Between form fields (stacking), default component padding, screen edge margin (mobile)
space-524Card padding (all sides), content area padding, grid gutter (tablet)
space-632Between page sections, screen margin (desktop), grid gutter (desktop)
space-740Large section dividers
space-848Page section vertical spacing, hero to content gap
space-964Major section breaks
space-1096Page top/bottom padding, empty state vertical centering

Semantic pairings

Three relationships appear often enough that they should be reached for by name rather than by number:

RelationshipValueAppears in
Icon to its labelspace-2 (8)Buttons, status chips, nav items, list rows
Field to fieldspace-4 (16)Every form in the product
Section to sectionspace-6 (32)Dashboard, settings, transfer review

If a new component needs one of these three, it uses the listed value without a separate decision. Divergence is where forms start looking like they came from different products.

Vertical rhythm on the transfer flow

The core flow is the strictest place in the system, because every step must look like the same screen advancing rather than four different screens:

RegionSpacing
Screen edge → contentspace-4 (16) mobile, space-6 (32) desktop
Step heading → bodyspace-2 (8)
Body → first fieldspace-5 (24)
Field → fieldspace-4 (16)
Last field → action barspace-6 (32)
Action bar internal paddingspace-4 (16)
Where to use each token
space-1 — Icon / dot to label
4px
Completed
space-2 — Inline button group gap
8px
space-3 — List item internal padding
12px
12px
Adaeze O.
-250 USD
Kwame M.
-120 USD
space-4 — Form field vertical gap
Devon
16px
Kim
space-5 — Card padding
24px
24px
From
Devon Kim
Canada
To
Min-ji Kim
South Korea
space-6 / space-8 — Section vertical spacing
32px
48px

Principles

PrincipleRule
GroupingRelated elements use smaller spacing (8px)
SeparationDistinct sections use larger spacing (32px+)
Vertical rhythmConsistent vertical intervals between blocks
Component internalPadding within components follows the scale
Component externalMargins between components follow the scale

Proximity beats decoration

When two things belong together, reduce the space between them before adding a border, a background, or a divider. A card that needs a border to explain its grouping usually has the wrong internal spacing. This keeps dense screens — a nine-field address form, a transaction list — from turning into a stack of boxes.

Space belongs to the parent

A component does not add outer margin to itself. It renders its own padding and lets the container decide the gap. A component with a built-in margin-bottom is unusable in any layout that wanted a different gap, and it is the most common reason a design system ends up with space-4 and space-4 stacking into 32px nobody asked for.

Layouts express gaps with gap, not with margins on children.

Do and don't

DoDon't
Use space-4 between every form fieldUse space-4 here and space-3 there because a field "looks tall"
Let the container set the gap with gapGive a component its own margin-bottom
Tighten spacing to show groupingAdd a border to show grouping that spacing could carry
Use space-5 for all card paddingUse 20px because 24 "felt like a lot"
Scale spacing with remMix a px margin into a rem layout
Grouping vs. separation
Related — 8px gaps
8px
8px
Distinct — 32px gaps
32px
32px

Spacing utilities

Spacing utility classes use logical properties for RTL/LTR support:

ClassPropertyAvailable values
snc-m-{n}margin (all sides)0–6
snc-mt-{n}margin-block-start0, 2, 4, 6
snc-mb-{n}margin-block-end0, 2, 4, 6
snc-my-{n}margin-block4, 6
snc-mx-automargin-inline: auto—
snc-p-{n}padding (all sides)0, 2, 3, 4, 5, 6
snc-px-{n}padding-inline4
snc-py-{n}padding-block2, 3, 4

The utility set is intentionally partial. Only the steps that recur across screens are exposed; the rest are applied through component tokens. A utility for every step of the scale invites layout to be assembled from utilities rather than from components.

Logical properties, not physical

margin-block-start rather than margin-top, padding-inline rather than padding-left/right. Senco ships to markets that include right-to-left scripts, and logical properties mean an RTL layout mirrors without a second stylesheet.

Known gaps

ItemStatus
space-0Used as a value, not defined as a --ds- variable
Semantic spacing conventions (inline gap, field gap, section gap)Documented in Tokens as conventions; not declared in ds.css
snc-px-* / snc-py-* coveragePartial — only the values listed above exist