Foundations
Radius & Elevation
Corner radii, borders, and the restrained shadow scale.
Structure comes from borders and alignment first. Shadows are subtle and never carry meaning on their own.
Radius#
Radius tiles use the token value as their corner radius.radius-2xl1rem
radius-full9999px
radius-lg0.5rem
radius-md0.375rem
radius-none0
radius-sm0.25rem
radius-xl0.75rem
Radius tokens
| Token | Value |
|---|---|
--ok-radius-2xl | 1rem |
--ok-radius-full | 9999px |
--ok-radius-lg | 0.5rem |
--ok-radius-md | 0.375rem |
--ok-radius-none | 0 |
--ok-radius-sm | 0.25rem |
--ok-radius-xl | 0.75rem |
Small radii keep controls precise. Larger radii are reserved for surfaces and overlays.
Elevation#
shadow-lg0 12px 32px -8px rgb(9 9 11 / 0.12), 0 4px 8px -4px rgb(9 9 11 / 0.05)
shadow-md0 4px 12px -2px rgb(9 9 11 / 0.08), 0 2px 4px -2px rgb(9 9 11 / 0.04)
shadow-sm0 1px 3px 0 rgb(9 9 11 / 0.06), 0 1px 2px -1px rgb(9 9 11 / 0.04)
shadow-xs0 1px 2px 0 rgb(9 9 11 / 0.04)
Shadow tokens
| Token | Value |
|---|---|
--ok-shadow-lg | 0 12px 32px -8px rgb(9 9 11 / 0.12), 0 4px 8px -4px rgb(9 9 11 / 0.05) |
--ok-shadow-md | 0 4px 12px -2px rgb(9 9 11 / 0.08), 0 2px 4px -2px rgb(9 9 11 / 0.04) |
--ok-shadow-sm | 0 1px 3px 0 rgb(9 9 11 / 0.06), 0 1px 2px -1px rgb(9 9 11 / 0.04) |
--ok-shadow-xs | 0 1px 2px 0 rgb(9 9 11 / 0.04) |
Borders before shadows
A one-pixel border is the default separator. Add elevation only when a surface needs to lift above its surroundings, such as a menu or dialog.
Borders#
Border tokens
| Token | Value |
|---|---|
--ok-border-width | 1px |
--ok-border-width-strong | 2px |
Border strength communicates structure, not status. Status is always paired with text or an icon.