Layout
Spacing, structure, and page composition patterns.
Spacing Scale
We use Tailwind's default spacing scale. Common values:
14pxTight gaps, icon alignment28pxComponent internal padding312pxForm field gaps416pxSection content gaps624pxCard padding, list gaps832pxSection spacing1248pxMajor section breaks2080pxPage section padding2496pxHero/footer paddingSection Rhythm
Consistent vertical rhythm creates scannable pages.
Page sections
Major sections on marketing pages
py-20 (80px)Content blocks
Between content sections within a page
space-y-8 (32px)Related items
Between related content items
space-y-4 (16px)Tight groups
Heading + paragraph, label + input
space-y-2 (8px)Content Width
Standard max-widths for different content types:
max-w-2xl672pxCTA sections, focused contentmax-w-3xl768pxDocumentation articles, long-formmax-w-4xl896pxComponent galleries, wider tablesmax-w-5xl1024pxMarketing sections with gridsmax-w-7xl1280pxFull-width marketing layoutsPage Templates
Standard page structures for different contexts:
Marketing Page
- • Header (fixed)
- • Hero section (py-24)
- • Content sections (py-20 each)
- • CTA section (py-20)
- • Footer
Full-width, stacked sections. Guest layout.
Documentation Page
- • Sidebar (fixed)
- • Header (sticky)
- • Article (max-w-3xl, mx-auto)
- • Section spacing (space-y-8)
Constrained width for readability. Docs layout.
App Dashboard
- • Sidebar (fixed or collapsible)
- • Header with breadcrumbs
- • Page header + actions
- • Content area (flexible)
Functional layout. App layout.
App Detail Page
- • Page header with back link
- • Main content (constrained)
- • Actions (sticky footer or header)
Focus on single item. App layout.
Content Density
Adjust density based on context and stage:
POC / Demo
- • Generous whitespace
- • Clear visual hierarchy
- • Focus on key interactions
- • Fewer items per view
Production App
- • Efficient space use
- • More items visible
- • Compact controls
- • Dense data tables
Start sparse for POC. Increase density as users need efficiency.
Common Layout Patterns
Centered content
mx-auto max-w-3xl px-4Articles, forms, focused content
Section container
px-4 py-20Marketing page sections
Card grid
grid gap-4 sm:grid-cols-2 lg:grid-cols-3Feature cards, options
Sidebar + content
flex (sidebar w-64, content flex-1)App and docs layouts
Layout Components
See Components → Layout for Shell, Sidebar, Header, and other layout components.