Skip to content

Spacing and density

Spacing runs on a 4 px base. Component padding lives on 4, 8, 12, 16 and 20. Use the scale; a value that is not on it is a defect.

TokenCSS variableValue
ui.space.0--okr-ui-space-00px
ui.space.1--okr-ui-space-14px
ui.space.2--okr-ui-space-28px
ui.space.3--okr-ui-space-312px
ui.space.4--okr-ui-space-416px
ui.space.5--okr-ui-space-520px
ui.space.6--okr-ui-space-624px
ui.space.8--okr-ui-space-832px
ui.space.10--okr-ui-space-1040px
ui.space.12--okr-ui-space-1248px
ui.space.16--okr-ui-space-1664px
ui.space.20--okr-ui-space-2080px
ui.space.24--okr-ui-space-2496px
ui.space.32--okr-ui-space-32128px
ui.space.42--okr-ui-space-42168px
ui.space.0-5--okr-ui-space-0-52px
ui.space.section--okr-ui-space-sectionclamp(96px, 5rem + 5vw, 168px)
ui.space.hero-top--okr-ui-space-hero-topclamp(40px, 2rem + 4vw, 104px)

comfortable is the default and is what marketing and docs use. compact is for tables and the app shell; set data-density="compact" on the root, and every token below changes. Coarse pointers keep targets of at least 44 px.

TokenCSS variableComfortableCompact
ui.row.height--okr-ui-row-height40px32px
ui.control.height--okr-ui-control-height36px28px
ui.control.padding-x--okr-ui-control-padding-x12px8px
ui.control.gap--okr-ui-control-gap8px4px
ui.nav.item--okr-ui-nav-item32px28px
ui.inset.card--okr-ui-inset-card16px12px
Owner
Okrado founders
Updated
Review by
Markdown version
/foundations/spacing.md