Foundations
Spacing
A 4px base rhythm, used without exception. Dense product UI is designed to be dense — spacing is generous where it aids scanning and tight where it does not.
Scale
The default Tailwind numeric utilities map 1:1 to this scale. There is no other spacing value.
14px
p-1 / gap-11.56px
gap-1.528px
p-2 / gap-2312px
p-3 / gap-3416px
p-4 / gap-4520px
p-5624px
p-6 / gap-6832px
p-8 / gap-81040px
py-101248px
py-12Density
The same components serve comfortable product UI and dense research terminals through one attribute.
Preview density:
Controls
Table rhythm (--density-row)
BTC-USD109,241.00+2.10%
ETH-USD4,182.40+0.84%
SOL-USD212.07-1.32%
Semantic spacing
Three layout tokens cover page-level rhythm.
| Token | Value | Use for |
|---|---|---|
container content | 1216px | Maximum width of a page's content column. |
container prose | 704px | Long-form reading width inside documentation. |
density-row | 36px / 30px | Table and list row height (comfortable / compact). |
control heights | 28 / 34 / 40px | Small, medium and large control sizing. |
Rules
Do
- Use the
gapscale onStackandInline. - Prefer one spacing decision per container.
- Reach for
data-density="compact"instead of local padding overrides.
Don't
- Invent values like
p-[13px]. - Compensate for a wrong layout by shrinking type.
- Mix comfortable and compact rhythm in one table.