Foundations

Spacing & Radius

Spacing follows a 4px base, so layouts line up. Use the scale instead of one-off values.

Spacing scale

Keep related things closer together than unrelated things. That does most of the work of showing what belongs together.

Tight gaps inside a control
Icon to label, compact padding
Between related items
Default padding and gaps
Between groups inside a container
Card padding, button side padding
Between major sections
Large layout bands
Macro layout, button height
Page margins

Corner radius

Larger containers get larger corners. 4px is the smallest radius used on components.

None Full-bleed edges and flush dividers
Small Fields, checkboxes, menu items, tooltips
Medium Alerts, toasts, menus
Large Cards, dialogs, popovers
Full Buttons, badges, switches

Density tokens

Aster has one standard density, with no compact mode.

NameValueUsed forToken
Control heightTable headers and icon buttons--as-density-control-height
Control side paddingPadding inside controls--as-density-control-padding-x
Control vertical paddingPadding inside controls--as-density-control-padding-y
Table row heightData table rows--as-density-table-row-height
Table cell side paddingData table cells--as-density-table-cell-padding-x
Table cell vertical paddingData table cells--as-density-table-cell-padding-y

Component heights

Buttons and fields have different heights, so a button beside an input in the same row is 4px taller. Align them to the center of the row.

ComponentHeight
Button (default)48px
Button (small / large)32px / 56px
Icon button40px
Input and Select44px
Table row48px
Esc
↑↓ navigateEnter openEsc close