Back

Layout & Spacing

A consistent spacing system based on a 4px base unit. Use these tokens for margins, padding, and gaps to maintain visual rhythm.

Spacing Scale

Based on a 4px base unit. Tailwind classes map directly to these values.

TokenValueVisualUse Case
space-00pxNone
space-14px
Tight grouping, icon padding
space-28px
Related elements, input padding
space-312px
Standard gap
space-416px
Component internal padding
space-520px
Card padding
space-624px
Section spacing
space-832px
Large gaps
space-1040px
Section breaks
space-1248px
Major section breaks
space-1664px
Page-level spacing
space-2080px
Hero sections
space-2496px
Massive spacing

Border Radius

rounded-sm

4px

Small buttons, chips, badges

rounded-md

6px

Inputs, small cards

rounded-lg

8px

Cards, modals (default)

rounded-xl

12px

Large cards, panels

rounded-full

9999px

Circular elements, pills

Grid System

12-column grid with responsive breakpoints. Gutters and margins adjust at each breakpoint.

BreakpointMin WidthColumnsGutterMargin
sm640px416px16px
md768px824px24px
lg1024px1224px32px
xl1280px1232px48px
2xl1536px1232pxauto

Content Width

Optimal content widths for readability. Prose should never exceed 75 characters per line.

Prose/narrativemax-w: 680px

Long-form text, articles

Chat interfacemax-w: 800px

Conversational UI

Data-heavy viewsmax-w: 1200px

Tables, dashboards

Full-widthmax-w: 1400px

Maximum content width

Density Guidelines

Spacious but not sparse. The interface should feel like there's room to think.

Compact

For data-dense contexts

  • Row height: 12px padding
  • Use in: Tables, lists, dense data

Comfortable

Default for most UI

  • Gaps: 16-24px
  • Use in: Chat messages, forms, cards

Generous

For featured content

  • Padding: 20-24px
  • Use in: Cards, modals, panels

Expansive

For hero/marketing sections

  • Spacing: 48-80px
  • Use in: Headers, landing pages

Component Sizing

ComponentHeightHorizontal Padding
Button (sm)32px12px
Button (md)40px16px
Button (lg)48px20px
Input40px12px
Cardauto20px (all sides)
Modalauto24px (all sides)