Tollerud

Tollerud UI/Layout / Grid

Layout

Layout primitives

Semantic page structure for consumer apps: shells, sections, stacks, clusters, grids, splits, and main content wrappers.

PageShell + Section

/layout/page-shell/

Start pages with a dark shell and a semantic section instead of hand-writing page backgrounds and spacing. The inner content wrapper is always flex flex-col flex-1 — add className='flex flex-col min-h-screen' to the shell and the flex chain works: header stays top, footer sticks bottom. Use contentClassName to add extra classes to the inner wrapper.

PropsPageShellProps
PropType
as?'div' | 'main'
background?PageShellBackground
density?PageShellDensity
contentClassName?string
Phase 2

Build with components first.

Use Tailwind only for small local glue in consumer apps.

page-shell

Stack + Cluster

/layout/stack-cluster/

Use Stack for vertical rhythm and Cluster for wrapping action rows, chips, toolbars, and nav groups.

PropsStackProps
PropType
as?'div' | 'section' | 'article' | 'header' | 'footer' | 'nav'
gap?StackGap
align?StackAlign

Production guardrails

Every action is logged and reversible.

OnlineReview required
stack-cluster

Grid + CardGrid

/layout/grid-cardgrid/

Use Grid for generic responsive tracks and CardGrid for card collections with Tollerud spacing defaults.

PropsGridProps
PropType
as?'div' | 'section'
columns?GridColumns
gap?GridGap
Emma
Iris
Pia
card-grid
systemctl status tollerud-agent
docker compose ps
generic-grid

Horizontal scroll rail for card rows, image strips, and overflow content. Use `visibleCount` when N items should fill the row and the rest scroll (achievement rails, product rows). Use `itemWidth` for fixed-pixel cards. Continuous scroll with peek (only when overflowing), edge fades (default on), and optional controls.

PropsScrollRailProps
PropType
as?'div' | 'section'
peek?ScrollRailPeek
gap?ScrollRailGap
controls?ScrollRailControls
fadeEdges?boolean
ariaLabel?string
itemWidth?number | string
visibleCount?number
trackClassName?string
Gold
Silver
Bronze
First visit
Ten reviews
scroll-rail-visible-count
Emma
Iris
Pia
Miriam
scroll-rail-cards
Rack overview
Cable management
PDU detail
Label pass
scroll-rail-images

Split + MainContent

/layout/split-maincontent/

Use Split for content/aside pages and MainContent for app routes that need consistent width, padding, and density.

PropsSplitProps
PropType
as?'div' | 'section'
ratio?SplitRatio
gap?SplitGap
align?SplitAlign
reverse?boolean

Primary content

A wider column for tables, forms, or detail content.

Aside

A narrower panel for metadata, actions, or status.

split-main