Design system/Foundations
Radius and shadow
The smaller and more interactive something is, the rounder its corners; the higher it sits in the layers, the longer its shadow. All buttons are pills.
In codeapp/globals.csscomponents/floating.tsx
Radius
Each kind of surface has its own radius. The pill (999) is the most common radius in the whole app: all buttons, pills, toasts, avatars, and switches.
6.badge-soft and .badge-accent8.icon-btn10Sidebar items, menu rows (9)14.dropdown-menu and the docs menu button16.card18.modal on desktop24 24 0 0.modal on phones; .sheet-menu at 20999All .btn elements, .pill, .toast, avatars, and switchesButtons have one shape: the pill
Buttons used to be rounded rectangles (10px, 8 for btn-sm, 12 on phones) while page header and top bar pills were fully round, and a single page could have both side by side. Now one rule at the end of globals.css makes every .btn a pill, at every size and on every page.
Shadow and layers
Shadows carry the warm color of the background (rgba(24, 20, 14)) and grow taller with each layer: cards on the page, menus on cards, dialogs over everything, and toasts even over dialogs, because they report what the dialog just did.
z 75z 1200.modal-overlayz 1250z 1280FLOAT_Zz 1300.toast-wrapPitfalls
- A pseudo-element with a negative z-index is painted above its parent's background, not behind it. For a "card behind a card," use an offset shadow with no blur.
- overflow-x: auto also sets the vertical axis to auto and clips the shadows of cards in a horizontal strip; give the strip vertical inner padding.
Radius, precisely
999pxException: .modal .btn on phones 12px16px18pxPhone 24px 24px 0 0; full-screen 020px 20px 0 014px9px10px10pxTouch 12px; floating field 08px8pxIn a phone list row 11px6pxLayers, precisely
z-index 75z-index 200.sheet-layerz-index 1200.modal-overlayz-index 1250Menu and its sheetz-index 1280FLOAT_Z; picker, calendarz-index 1300.toast-wrap- The sheet shadow points upward: 0 -12px 40px -12px rgba(24, 20, 14, 0.45).
- Dialog backdrop rgba(20, 16, 12, 0.45) with blur(3px); sheet backdrop rgba(0, 0, 0, 0.38) with no blur.
Related pages