Spacers
Golden-ratio spacing scale. Klik op een bar of token-naam om de SCSS-variabele te kopiëren.
Why a spacer scale?
De spacer-schaal gebruikt de gulden snede (φ ≈ 1.618) als ratio. Elke stap is perceptueel duidelijk groter dan z'n voorganger zonder visuele "spring" — wat één enkele set van 10 waarden genoeg maakt om het hele bereik te dekken van 2px (hairline) tot 178px (marketing-rhythm). Naamgeving volgt t-shirt sizing (3xs–4xl) parallel met de overige scales (typography, radius, levitation).
Overview — alle 10 stappen op één as
De bars hebben hun letterlijke pixel-breedte; de golden-ratio progressie is in één blik zichtbaar. (actual size on wider screens — onder 720px viewport scalen ze proportioneel weg)
- 3xs2px
- 2xs4px
- xs6px
- s10px
- m16px
- l26px
- xl42px
- 2xl68px
- 3xl110px
- 4xl178px
Gebruik
@use "@ftp/style-library/scss/variables/spacers" as *;
.my-element {
padding: $space-m;
margin-bottom: $space-l;
gap: $space-xs;
}Eén schaal, één naam: $space-<size>. Kies de stap die qua afstand klopt; geen aparte aliases voor padding / margin / gap nodig. De CSS-custom-property-variant --space-<size> is beschikbaar wanneer je runtime-themes wilt respecteren.
Per token — bar, gap-demo, rationale
3xs $space-3xs2pxLiteral sizeAs gap (vertical)Hairline gaps between dense icons/glyphs; never for inset padding.
2xs $space-2xs4pxLiteral sizeAs gap (vertical)Tight gap between a chip and its trailing × button, or icon-and-label.
xs $space-xs6pxLiteral sizeAs gap (vertical)Compact inline-flex gap; small-button inset padding.
s $space-s10pxLiteral sizeAs gap (vertical)Default input padding; small card content gap.
m $space-m16pxLiteral sizeAs gap (vertical)Standard component inset; the most-used spacer in a typical UI.
l $space-l26pxLiteral sizeAs gap (vertical)Section gap between distinct content blocks within a card or panel.
xl $space-xl42pxLiteral sizeAs gap (vertical)Page-region separator: between a primary content area and a sidebar widget.
2xl $space-2xl68pxLiteral sizeAs gap (vertical)Major page-section margin (between hero and the first content row).
3xl $space-3xl110pxLiteral sizeAs gap (vertical)Marketing-page rhythm; not used in productive UI.
4xl $space-4xl178pxLiteral sizeAs gap (vertical)Marketing-page rhythm; not used in productive UI.