Density
Default and compact density and how control heights change.
How it works
The design system has two densities: default and compact. Set data-density="compact" on a container and every control inside it uses the compact height. The density switch in the top bar sets it for these docs.
| Token | Default | Compact |
|---|---|---|
control.height.sm | 32px | 28px |
control.height.md | 36px | 32px |
control.height.lg | 40px | 36px |
Compare
The three control heights in each density, side by side. These are shapes, not real buttons.
default
smmdlg
compact
smmdlg
When to use compact
Use compact for tables, filter bars and screens people scan all day. Use default for forms, settings and first-time flows. Don't mix densities in one view.