Skip to content
Saeede Agahi

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.

Control height by density
TokenDefaultCompact
control.height.sm32px28px
control.height.md36px32px
control.height.lg40px36px

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.