Skip to main content

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: .grid2 columns of at least 260px, .grid3 at least 220px, form grids at least 240px; section menus 220 to 260px beside a flexible main column.
  • Clinical Sidebar offsets content by side-w 240px (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-h 36px with 9px table cell padding; Compact is 30px (control-h-compact) with 4px cells and 10px card padding. Phones use control-h-touch 44px minimum; the kiosk control-h-kiosk 48px. 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-card on cards (none in Command Bar and Dark, which use a border), shadow-pop on 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​

TokenValueSampleUsage
--co-space-14pxIcon-to-text gap in tags, menu padding.
--co-space-1-56pxGap between buttons in a toolbar; label to field.
--co-space-28pxButton group gap, compact card padding (10px).
--co-space-2-510pxInput inner padding, nav item padding.
--co-space-312pxDefault gap of .row, .grid2, .grid3, .wrap padding.
--co-space-3-514pxModal header and footer vertical padding, stat card padding.
--co-space-416pxCard padding, mobile body side padding, phone gutter.
--co-space-520pxModal body and header side padding, kiosk body.
--co-space-624pxSettings row column gap, toast bottom offset.

Radius​

TokenValueSampleUsage
--co-radius-xs4pxInputs, tags, slots, menu items, calendar chips.
--co-radius-sm6pxButtons, menus, banners, table frame.
--co-radius-md8pxCards, stat cards, nav items, toasts, search box.
--co-radius-lg10pxShell menus, rail items, patient tabs, drop zones.
--co-radius-xl12pxModals, chat bubbles, PIN keys.
--co-radius-2xl14pxCommand palette.
--co-radius-sheet16pxTop corners of the mobile bottom sheet.
--co-radius-pill999pxChips, pills, badges, switches, avatars, progress bars.

Shadow​

TokenValueSampleUsage
--co-shadow-cardclassic: 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: noneCards. Command Bar uses a 1px border instead of a shadow; Dark relies on borders.
--co-shadow-pop0 12px 32px rgba(16, 24, 40, 0.18)Menus, modals, drawers.
--co-shadow-toast0 12px 32px rgba(16, 24, 40, 0.25)Toast.
--co-shadow-palette0 24px 60px rgba(0, 0, 0, 0.3)Command palette.
--co-shadow-seg0 1px 2px rgba(16, 24, 40, 0.12)Selected segment of a segmented control.

Z-index​

TokenValueUsage
--co-z-menu30Row menus and dropdowns inside a page.
--co-z-nav40Sidebar and rail; also the page overlay (.ov) in the source.
--co-z-toast60Toasts and shell menus.
--co-z-tooltip70Rail tooltips.
--co-z-palette80Command palette and mobile nav overlay.

Density​

TokenValueUsage
--co-control-h36pxButton and input height, Comfortable.
--co-control-h-compact30pxButton and input height in Compact density and the sm size.
--co-control-h-touch44pxMinimum tap target on phone screens.
--co-control-h-kiosk48pxKiosk buttons and inputs; the lg size.
--co-cell-py9pxTable cell vertical padding, Comfortable (Compact: 4px).
--co-side-w240pxClinical Sidebar width; 64px collapsed and for the rail.
--co-topbar-h52pxTop bar height.
--co-content-max1440pxMax width of the page wrap.