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.
Corner radius
Larger containers get larger corners. 4px is the smallest radius used on components.
Density tokens
Aster has one standard density, with no compact mode.
| Name | Value | Used for | Token |
|---|---|---|---|
| Control height | Table headers and icon buttons | --as-density-control-height | |
| Control side padding | Padding inside controls | --as-density-control-padding-x | |
| Control vertical padding | Padding inside controls | --as-density-control-padding-y | |
| Table row height | Data table rows | --as-density-table-row-height | |
| Table cell side padding | Data table cells | --as-density-table-cell-padding-x | |
| Table cell vertical padding | Data 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.
| Component | Height |
|---|---|
| Button (default) | 48px |
| Button (small / large) | 32px / 56px |
| Icon button | 40px |
| Input and Select | 44px |
| Table row | 48px |