Spacing & layout
The compact spacing scale, the canonical gap rules (which gap goes where), control / icon sizes, and page-layout tokens. Border radii derive from --radius (6px).
Scale
Compact scale — class numbers don't map to standard Tailwind pixels.
00px12px26px310px414px518px620px724px828px936px1040px1144px1248px0.51px1.54px2.58px3.512px
Conventions — which gap goes where
Pick spacing by intent, not by eyeballing the scale. These are the canonical rules every component follows.
| Rule | Value | Class | Used by |
|---|---|---|---|
| Control padding (horizontal) | 8 / 10 / 12px | px-2 · px-2.5 · px-3 | Button, Select, Toggle, Input (sm / md / lg) |
| Internal gap (icon ↔ text) | 6px | gap-1.5 | Button, Badge, SelectTrigger |
| Group gap (sibling controls) | 4px | gap-1 | TabsList, ToggleGroup, Pagination |
| List-item gap (menu rows) | 2px | gap-0.5 | MenuItem, DropdownMenu |
| Form stack (Field) | 6px | gap-2 | Field — Label → control → description |
| Section rhythm (page) | 40px | space-y-10 | Between top-level page sections |
Control & icon sizes
Control heights
smmdlgIcon sizes
smmdlgRadius
sm
4px
DEFAULT
6px
md
8px
lg
10px
xl
12px
popover
12px
full
9999px
none
0px
Layout tokens
| Token | Value | Purpose |
|---|---|---|
| --header-height | 56px | Page header AND Sidebar / SidePanel header heights — keeps cross-column header strokes aligned. |
| --control-h-sm / md / lg | 28 / 32 / 36px | Canonical interactive-control heights. Inputs use min-h-[var(--control-h-md)]. |
| --icon-sm / md / lg | 12 / 16 / 20px | Icon sizes — sm/md for control icons, lg for standalone emphasis icons. |
| --page-max-width | 48rem | Standard content column width (max-w-page). |
| --page-max-width-prose | 42rem | Narrower column for prose-heavy pages (max-w-page-prose). |
Shadows
sm
DEFAULT
md
lg
xl
2xl
inner
overlay
input-inner