Sizes
Default and compact sizes share the same control scale.
Installation
One prompt for your coding agent to set up Reflow and use this system in Remix.
The principle
A button next to a select next to a tab should land at the same height. Each size scales text, icons, and padding together.
Use compact controls in dense, data-heavy regions. Default gives everyday controls more room.
Typography scale
Compact reduces type size and line height together, preserving the hierarchy at a smaller size.
See the full scale in Typography. Press S outside a field to switch between densities.
Compact regions
Set density on an ancestor to scale a whole group. Switch the example and compare the measured control height.
Token reference
Inspect either toolbar row to measure the controls alongside the tokens below.
| Token | Default | Compact |
|---|---|---|
--rf-control-height | 36px | 28px |
--rf-control-padding | 12px | 10px |
--rf-text-display | 28px | 24px |
--rf-text-title | 16px | 15px |
--rf-text-body | 13px | 12px |
--rf-text-caption | 12px | 11px |
--rf-text-micro | 11px | 10px |
--rf-leading-body | 20px | 18px |
--rf-gap | 8px | 4px |
--rf-icon-size | 16px | 14px |
Regional density reference
Use data-density on an element to set the inherited CSS tokens. A nested region can override its ancestor’s density.
| Attribute | Values | Scope |
|---|---|---|
data-density | default | compact | Element and descendants |
Component size prop
Use the size prop to override density for one control.
| Prop | Values | Components |
|---|---|---|
size | default | compact | Tabs, Select, and other controls |
size | default | compact | icon | icon-compact | Button |