Foundations

Tokens & layout

BR-UI now exposes spacing, stacking, motion, focus, opacity, blur, and status tokens as first-class CSS vars. Use them before inventing local values.

Spacing

TokenValueUse
--space-14pxFine offsets, icon gaps
--space-28pxCompact inline gaps
--space-312pxControl internals
--space-416pxDefault cluster gap
--space-524pxCard and form rhythm
--space-632pxPanel padding
--space-748pxSection groups
--space-864pxMajor page breaks

Stacking

TokenValueUse
--z-sticky40Topbar
--z-menu50Tooltip, popover, dropdown
--z-overlay60Scrim
--z-modal70Dialog, sheet, drawer
--z-toast80Toast host
--z-tweaks90Tweaks panel

Motion

TokenValueUse
--duration-fast120msSmall state changes
--duration-base220msDefault interaction
--duration-slow420msEntrances and large shifts
--ease-standardcubic-bezier(.2,.8,.2,1)Default
--ease-out-quartcubic-bezier(.16,1,.3,1)Entrances

Responsive strategy

Breakpoints are exposed in Tailwind v4 as br-sm, br-md, br-lg, br-xl, and br-2xl. Prefer grids that collapse 4 → 2 → 1 and keep tables horizontally scrollable below dashboard width.

Reduced motion

Global animations and transitions respect prefers-reduced-motion. Keep local animation code on --duration-* and --ease-*so that system override remains effective.