25 real-world patterns

Reusable compositions built exclusively from layout primitives. Each pattern solves a recurring UI problem — copy the markup, adjust the tokens.

01
App Shell
Header, scrollable main, footer. The universal SPA container.
sandwich-layoutsticky-layoutrepel-layoutregion-layout
Acme App
JD
Content block A
Content block B
Content block C
© 2026 Acme Corp
02
Sidebar + Main
Fixed-width nav sidebar beside a flexible main content area.
split-pane-layoutpane-layoutstacked-layoutscrolling-layout
Navigation
Dashboard
Projects
Analytics
Settings
Dashboard
Overview
Main content area. Flexible width, independent scroll.
Additional content block
03
Three-Panel IDE
File tree | editor | output/preview. Named-area grid with header row.
split-pane-layoutpane-layoutscrolling-layout
index.ts| styles.css
Files
📁 src
📄 index.ts
📄 styles.css
📁 dist
import { define } from '@ds/layout';
define();
Output
✓ Compiled in 12ms
04
Navigation Bar
Logo pushed left, links centered via bookend, actions right.
bookend-layoutcluster-layouticon-text-layout
05
Responsive Card Grid
Auto column count from minimum width. No breakpoints. Cards align via subgrid.
fluid-grid-layoutsubgrid-layoutquadrilateral-layout
Design Tokens
Systematic approach to spacing, color, and type scales that cascade coherently.
12 articles
Component Patterns
Reusable UI compositions built on layout primitives with accessibility baked in.
8 articles
Motion Design
Presence-driven transitions with exponential easing and View Transitions integration.
6 articles
06
Product Detail Page
Image gallery left, product info right. Switches from column to row at 35rem.
split-layoutaspect-ratio-layoutstacked-layoutcluster-layout
📦
Ceramics Studio
Stoneware Mug No. 12
$48.00
HandmadeLead-free280ml
Wheel-thrown and fired in our Brooklyn studio. Each piece is unique with slight variations in glaze.
Add to cart Save
07
Activity Feed
Timestamped events in a scrollable column. icon-text + repel per row.
scrolling-layoutstacked-layouticon-text-layoutrepel-layout
Recent activity
Aria Hassan merged PR #142
2m ago
Jun Nakamura deployed to staging
14m ago
💬
Priya Osei commented on issue #87
1h ago
CI / build failed on branch feat/grid
2h ago
Soren Larsen tagged release v2.4.0
3h ago
Mia Chen deployed to production
5h ago
08
Pricing Cards
Three tiers with aligned feature rows using subgrid. Tallest feature list sets the row height.
columns-layoutsubgrid-layoutstacked-layout
Free
$0 /mo
5 projects 1 user Community support
Pro
$29 /mo
Unlimited 5 seats Priority support Custom domains
Team
$99 /mo
Unlimited 25 seats SLA 99.9% SSO / SAML Audit log
09
Hero Section
z-axis stacking for layered bg + content. overlay for decorative elements. golden ratio subtree.
z-axis-layoutoverlay-layoutcentered-layoutregion-layout
New in v0.1.0

Compose layouts.
Not layout CSS.

Declarative HTML primitives with zero specificity, design tokens, and no build step.

Get started Read docs
10
Kanban Board
Horizontal scroll of fixed-width columns. Each column scrolls vertically independently.
scrolling-layoutstacked-layoutquadrilateral-layout
Backlog 3
Research API auth
Write migration plan
Audit deps
In Progress 3
Build split-pane
Fix presence bug
Token docs
Review 2
PR #142 CSS refactor
Changelog draft
Done 4
Core tokens
stacked-layout
cluster-layout
repel-layout
11
Notification Cards
Left-border severity accent via border-is. icon-text + repel per row.
stacked-layoutquadrilateral-layouticon-text-layoutrepel-layout
Deployment succeeded v2.4.1 live on production SUCCESS High memory usage Worker pool at 87% capacity WARNING Database unreachable Failover to replica in progress ERROR Maintenance window Mar 25 at 02:00 UTC INFO
12
Timeline
rows-layout with 2 explicit columns: marker track (auto) | content track (1fr).
rows-layoutstacked-layout
Q1 2024
Project kick-off
Initial architecture and token system defined.
Q2 2024
Core primitives shipped
stacked, cluster, repel, split released.
Q3 2024
Grid system complete
columns, rows, fluid-grid, subgrid added.
Q4 2024
Presence & motion
presence-layout with View Transitions.
Q1 2025
v0.1.0 release
First stable release with full test suite.
13
Chat Interface
Scrollable message history. repel aligns avatars and bubbles. Input bar at bottom.
sandwich-layoutscrolling-layoutstacked-layouticon-text-layout
AR
Aria Rahman online
AR
Hey, the layout system looks incredible!
Me
Thanks! Just shipped presence-layout with exponential easing.
AR
Does it work with Datastar signals?
Me
Yes — just set data-state from a signal. Fully behaviorless.
14
Settings Page
Tabbed sidebar navigation with form content area. Vertical nav + main split.
split-layoutstacked-layoutrepel-layoutrows-layout
Account
Profile
Security
Notifications
API Keys
Team
Members
Billing
Integrations

Profile

Display name
Email
Username
Changes auto-save Save
15
Article with Pull Quote
Prose in centered column. Full-bleed pull quote via breakout + breakin.
region-layoutcentered-layoutbreakout-layoutbreakin-layout
On the nature of layout
Good layout is invisible. When it works, users see content — not structure. The moment they notice the grid, something has gone wrong.
"
Layout should disappear. The user should only see content.
This is why layout primitives with zero specificity matter. They hold your content without competing with it, and vanish from the developer's mental model once they become habit.
16
KPI Dashboard Row
Asymmetric grid: main KPI at 2fr, three secondary at 1fr each. Repel for change indicator.
columns-layoutstacked-layoutrepel-layout
Monthly Revenue ↑ 18%
$2.4M
vs $2.03M last month
New Users
1,284
↑ 24%
Conversion
3.7%
↓ 0.2%
Avg Order
$187
↑ 9%
17
Image + Caption Overlay
z-axis-layout stacks caption over image in flow. No position:absolute on the caption.
z-axis-layoutaspect-ratio-layoutstacked-layout
🏔
Summit Trail
12km · Moderate
🌊
Coastal Path
8km · Easy
18
Masonry Gallery
Variable-height items fill the shortest column. Multicol baseline, CSS masonry where supported.
masonry-layoutquadrilateral-layout
🌿 Fern 🌸 Cherry Blossom
Photo by Aria H.
🪨 Stone 🌊 Ocean Study
Series no. 4
🌙 Lunar 🏔 Mountain Range
High Sierra 2024
🌻 Sunflower 🦋 Butterfly
in Blue
🌱 Seedling
19
Feature List
icon-text rows in a 2-column grid. Each icon tracks font size — scales with type.
fluid-grid-layouticon-text-layoutstacked-layout

Why layout primitives

Zero specificity
Every rule uses :where() — nothing wins by default, everything can be overridden.
🧩
Composable
Nest any primitive inside any other. No special rules or forbidden combinations.
📐
Token-coherent
Spacing, type, and ratios all derive from the same scale root.
Accessible
No layout hacks that break reading order. DOM structure matches visual structure.
20
Profile Cards + Badges
z-axis-layout for badge placement without position:absolute. [isolate] scopes z-index.
z-axis-layoutfluid-grid-layoutquadrilateral-layout
AH
3
Aria Hassan
Design Eng
● Online
JN
Jun Nakamura
Frontend
● Online
PO
9+
Priya Osei
Backend
○ Away
SL
1
Soren Larsen
Fullstack
● Online
21
Two-Column Form
split-layout for the top half, full-width fields below. Consistent spacing via stacked-layout.
stacked-layoutsplit-layoutrepel-layout

New workspace


First name
Last name
Workspace name
Team size

Cancel Create workspace
22
Toast Stack
overlay-layout fixed at bottom-center. presence-layout animates each toast in/out.
overlay-layoutpresence-layoutstacked-layoutrepel-layout
← page content area →
Profile saved successfully Session expires in 5 minutes New version available
23
Site Footer
fluid-grid for link columns. repel for sub-footer. stacked per column.
region-layoutfluid-grid-layoutstacked-layoutrepel-layout
24
Empty State
sandwich-layout with 1fr middle holds centered content vertically in any container height.
sandwich-layoutcentered-layoutstacked-layout
No projects yet
Create your first project to get started with the layout system.
Create project
25
Horizontal Film Strip
Snap-scrolling carousel with peek. Each card is a fixed item width via the item attribute.
scrolling-layoutaspect-ratio-layoutz-axis-layout
Featured articles ← drag →
📐
Tokens
Fluid spacing systems
📦
Techniques
Container query patterns
Grid
Subgrid for card alignment
Motion
Presence-driven UI
📊
Opinion
The role of breakpoints