Skip to content

Spacing & elevation

Spacing tokens sit on a 0.25rem grid. Fractional steps use a hyphen: --nw-space-0-5 is 0.125rem, --nw-space-1-5 is 0.375rem and --nw-space-2-5 is 0.625rem.

–nw-space-10.25rem
–nw-space-20.5rem
–nw-space-30.75rem
–nw-space-41rem
–nw-space-51.25rem
–nw-space-61.5rem
–nw-space-82rem
–nw-space-102.5rem
–nw-space-123rem
–nw-space-164rem
–nw-space-205rem
–nw-space-246rem

The full set is 0, px (1px), 0-5, 1, 1-5, 2, 2-5, 3, 4, 5, 6, 8, 10, 12, 16, 20 and 24. The Tailwind theme binds Tailwind’s spacing to this grid (--spacing: var(--nw-space-1)), so p-4 equals --nw-space-4 and arbitrary values stay on the grid.

Two corner languages coexist: radii for ordinary surfaces, and the cut chamfer for signature surfaces. Buttons and inputs use md, cards and dialogs lg; the cut chamfers the top-right and bottom-left corner only.

xs 2px

sm 4px

md 8px

lg 12px

xl 16px

2xl 24px

cut –nw-cut 10px

Tokens: --nw-radius-xs to --nw-radius-2xl and --nw-radius-full (9999px). Tailwind: rounded-xs to rounded-2xl map to the tokens; rounded-full is Tailwind’s own. The cut is .nw-cut (or the Tailwind cut utility), sized by --nw-cut (10px); opt-in component variants .nw-btn-cut, .nw-card-cut and .nw-hud-cut chamfer those surfaces. See Effects & motion for how the cut paints and glows.

Token Value Tailwind
--nw-control-xs 1.75rem h-7 equivalents
--nw-control-sm 2rem h-8
--nw-control-md 2.5rem h-10
--nw-control-lg 3rem h-12

Controls default to md; pick the size for the interaction, not the label length, and prefer md or larger on touch layouts. Every height clears the 24px WCAG 2.2 minimum target.

Depth comes first from tone. Each step raises the surface one level; hover and active states move one more.

canvas-sunken crust

canvas-subtle mantle

canvas base

panel surface0

panel-hover surface1

panel-active surface2

Shadows add separation for floating layers, tinted by --nw-shadow-ink: near-black on the dark flavors, the text ink at a lower strength on Lumen.

shadow-sm –nw-shadow-sm

shadow-md –nw-shadow-md

shadow-lg –nw-shadow-lg

Cards use sm, toasts and HUD panels md or lg, menus, popovers and dialogs lg. Tailwind: shadow-sm, shadow-md, shadow-lg, plus shadow-glow-sm, shadow-glow-md, shadow-glow-lg and shadow-glow-wire for the neon effects. The neon glow is an effect, not elevation: see Effects & motion.

Token Value For
--nw-z-dropdown 1000 Dropdowns and select lists
--nw-z-sticky 1100 Sticky headers and toolbars
--nw-z-overlay 1300 Backdrops
--nw-z-modal 1400 Dialogs and drawers
--nw-z-popover 1500 Popovers and menus
--nw-z-toast 1600 Toasts
--nw-z-tooltip 1700 Tooltips