Layout, spacing and density
- Page wrap: max 1440px (
content-max), 12px padding and 12px gaps (space-3). Cards pad 16px (space-4), modals 20px (space-5). - Grids:
.grid2columns of at least 260px,.grid3at least 220px, form grids at least 240px; section menus 220 to 260px beside a flexible main column. - Clinical Sidebar offsets content by
side-w240px (64px collapsed); Focus Rail by 64px; Classic and Command Bar by none. Under 900px the sidebar and rail fold into a menu button. - Density: Comfortable controls are
control-h36px with 9px table cell padding; Compact is 30px (control-h-compact) with 4px cells and 10px card padding. Phones usecontrol-h-touch44px minimum; the kioskcontrol-h-kiosk48px. Classic does not apply Compact. - Radius: 4px inputs and tags, 6px buttons and menus, 8px cards, 10px shell menus, 12px modals, 999px pills.
- Shadow:
shadow-cardon cards (none in Command Bar and Dark, which use a border),shadow-popon menus, modals and drawers. - Z-index: page menus 30, nav and overlays 40, toasts 60, tooltips 70, command palette 80.
- Motion (notes, not tokens): sidebar width 150ms, switch knob 150ms, spinner 0.8s per turn, toast stays 2800ms, skeleton pulse 1.4s. All slow down or stop under prefers-reduced-motion.
Spacing
| Token | Value | Sample | Usage |
|---|---|---|---|
--co-space-1 | 4px | Icon-to-text gap in tags, menu padding. | |
--co-space-1-5 | 6px | Gap between buttons in a toolbar; label to field. | |
--co-space-2 | 8px | Button group gap, compact card padding (10px). | |
--co-space-2-5 | 10px | Input inner padding, nav item padding. | |
--co-space-3 | 12px | Default gap of .row, .grid2, .grid3, .wrap padding. | |
--co-space-3-5 | 14px | Modal header and footer vertical padding, stat card padding. | |
--co-space-4 | 16px | Card padding, mobile body side padding, phone gutter. | |
--co-space-5 | 20px | Modal body and header side padding, kiosk body. | |
--co-space-6 | 24px | Settings row column gap, toast bottom offset. |
Radius
| Token | Value | Sample | Usage |
|---|---|---|---|
--co-radius-xs | 4px | Inputs, tags, slots, menu items, calendar chips. | |
--co-radius-sm | 6px | Buttons, menus, banners, table frame. | |
--co-radius-md | 8px | Cards, stat cards, nav items, toasts, search box. | |
--co-radius-lg | 10px | Shell menus, rail items, patient tabs, drop zones. | |
--co-radius-xl | 12px | Modals, chat bubbles, PIN keys. | |
--co-radius-2xl | 14px | Command palette. | |
--co-radius-sheet | 16px | Top corners of the mobile bottom sheet. | |
--co-radius-pill | 999px | Chips, pills, badges, switches, avatars, progress bars. |
Shadow
| Token | Value | Sample | Usage |
|---|---|---|---|
--co-shadow-card | classic: 0 1px 3px rgba(16, 24, 40, 0.08); sidebar: 0 1px 3px rgba(16, 24, 40, 0.08); rail: 0 1px 3px rgba(16, 24, 40, 0.08); command: none; dark: none | Cards. Command Bar uses a 1px border instead of a shadow; Dark relies on borders. | |
--co-shadow-pop | 0 12px 32px rgba(16, 24, 40, 0.18) | Menus, modals, drawers. | |
--co-shadow-toast | 0 12px 32px rgba(16, 24, 40, 0.25) | Toast. | |
--co-shadow-palette | 0 24px 60px rgba(0, 0, 0, 0.3) | Command palette. | |
--co-shadow-seg | 0 1px 2px rgba(16, 24, 40, 0.12) | Selected segment of a segmented control. |
Z-index
| Token | Value | Usage |
|---|---|---|
--co-z-menu | 30 | Row menus and dropdowns inside a page. |
--co-z-nav | 40 | Sidebar and rail; also the page overlay (.ov) in the source. |
--co-z-toast | 60 | Toasts and shell menus. |
--co-z-tooltip | 70 | Rail tooltips. |
--co-z-palette | 80 | Command palette and mobile nav overlay. |
Density
| Token | Value | Usage |
|---|---|---|
--co-control-h | 36px | Button and input height, Comfortable. |
--co-control-h-compact | 30px | Button and input height in Compact density and the sm size. |
--co-control-h-touch | 44px | Minimum tap target on phone screens. |
--co-control-h-kiosk | 48px | Kiosk buttons and inputs; the lg size. |
--co-cell-py | 9px | Table cell vertical padding, Comfortable (Compact: 4px). |
--co-side-w | 240px | Clinical Sidebar width; 64px collapsed and for the rail. |
--co-topbar-h | 52px | Top bar height. |
--co-content-max | 1440px | Max width of the page wrap. |