Space & shapeMarkdown
Sizing
Controls and form elements share a five-step sizing scale (16 · 24 · 32 · 40 · 48 px) across four named tiers (xs to lg). Each tier pairs a control height with a matching icon size and corner radius.
Control sizing scale
| Size | Height | Icon | Radius | Target rule | Sample |
|---|---|---|---|---|---|
| xs | 24px (1.5rem) | 16px (1rem) | radius-sm (0.25rem) | WCAG 2.5.8 minimum | xs |
| sm | 32px (2rem) | 16px (1rem) | radius-sm (0.25rem) | Compact control | sm |
| md | 40px (2.5rem) | 20px (1.25rem) | radius-md (0.5rem) | Default control | md |
| lg | 48px (3rem) | 24px (1.5rem) | radius-md (0.5rem) | Primary mobile touch | lg |
Raw sizing steps: 16px · 24px · 32px · 40px · 48px.
Set md (40px) as the default control height for desktop forms and toolbars. Use lg (48px) for primary touch targets on mobile viewports.
Usage
Bind control height, icon size, and corner radius to the paired component tokens:
<button
type="button"
className="inline-flex items-center gap-2 border border-border bg-primary px-4 font-sans text-body font-medium text-primary-foreground"
style={{
height: "var(--control-height-md)",
borderRadius: "var(--control-radius-md)",
}}
>
Confirm
</button>.control-lg {
height: var(--control-height-lg);
border-radius: var(--control-radius-lg);
padding-inline: var(--space-4);
}Do and don't
Do: Match control height, icon size, and radius
Pair xs/sm controls with 16px icons and radius-sm, md controls with 20px icons and radius-md, and lg controls with 24px icons.
Don't: Shrink interactive targets below 24px
Do not render clickable buttons or icon triggers smaller than 24px because sub-24px targets fail WCAG 2.5.8 minimum target size.
Accessibility
- Enforce
24px(--control-height-xs) as the minimum interactive target size to meet WCAG 2.5.8. - Use
48px(--control-height-lg) for primary mobile touch controls so thumb taps remain accurate.
Rationale
Coupling height, icon size, and radius per tier ensures adjacent inputs, selects, and buttons align on the same horizontal baseline.