# Composing Layouts

> Use when a UI needs an intentional spatial composition, grid, container model, section rhythm, alignment system, or relationship between content, controls, and media.

- Skill: `nolane-x/composing-layouts` (Agent Skill)
- Install (CLI): `npx get-skill add nolane-x/composing-layouts`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nolane-x/composing-layouts/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Nolane-x (https://skillmd.com/u/nolane-x)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/nolane-x/composing-layouts

---


# Composing Layouts

## Overview
Layout is the geometry of meaning. Compose from content relationships, task flow, and visual thesis before choosing arbitrary columns or card grids.

## Parent Contract
**Required parent:** `routing-ui-work`.

Consume IA, hierarchy, aesthetic direction, density requirements, and responsive constraints.

## Establish the spatial grammar
Define:
- viewport/container behavior: fixed max width, fluid, full bleed, pane-based, canvas, split view
- primary grid: columns/tracks and gutters
- alignment anchors: edges/centers/baselines that repeated elements obey
- vertical rhythm: spacing relationships, not a pile of one-off margins
- major zones: navigation, work area, inspector, utility rail, contextual controls, media
- overlap/stacking rules if the direction uses layers

## Compose by relationships
Elements that users compare should align. Elements that form one decision should stay perceptually close. Elements with different semantic roles need enough spatial distinction to avoid false grouping.

Prefer whitespace and alignment over borders when containment is not semantically needed. Use bounded surfaces when they communicate object identity, interaction boundary, layering, or state.

## Container test
Before adding a card/panel ask:
1. Does the content represent one bounded object or interaction region?
2. Does the boundary help scanning, selection, drag/drop, or layering?
3. Would whitespace/grouping alone be clearer?
4. Is this creating a surface inside a surface inside a surface?

Nested framing is a cost: every border/radius/elevation introduces another hierarchy level.

## Section/page rhythm
For long surfaces vary scale, density, media ratio, alignment, and whitespace **without inventing unrelated component families**. Rhythm comes from controlled contrast within a coherent grammar.

For operational products prefer stable spatial memory: critical controls and repeated columns should not move merely to make each screen visually novel.

## Asymmetry
Asymmetry is useful when it expresses priority, direction, or brand character. It becomes noise when alignment relationships disappear. Preserve invisible anchors even in expressive compositions.

## Content-led dimensions
Do not fix heights around demo content unless the product requires it. Define min/max behavior, wrapping, truncation policy, scroll ownership, sticky regions, and overflow semantics.

## Scroll architecture
Decide who owns scroll: document, pane, table region, canvas, drawer. Multiple nested scroll regions require strong justification and clear focus/keyboard behavior.

## Output: `composition-contract`
Return `container_model`, `grid`, `anchors`, `zones`, `vertical_rhythm`, `containment_rules`, `scroll_ownership`, `sticky_rules`, `overflow_policy`, `section_rhythm`, `content_stress`, and `responsive_implications`.

## Common failures
- Centering everything by default.
- Large rounded wrapper around the entire app plus nested cards for every region.
- Arbitrary max-width that makes dense tables unusable.
- Using equal columns when one region is clearly primary.
- Fixed viewport-height sections that clip content or break zoom.

## V5 Magnitude and Spatial Dramaturgy
When “huge”, monumental, institutional, expansive, awe-producing, or equivalent magnitude goals are material, route `composing-spatial-dramaturgy`. Distinguish logical scope from spatial/visual **magnitude**. Information geometry remains necessary, but **spatial dramaturgy** may intentionally sequence compression → reveal → expansion → focused inspection → re-expansion, with quiet fields and institutional anchors. More pages or permanent fixed chrome do not by themselves satisfy a magnitude target.

## V6 Constraint-Driven Layout Composition
Model layout as a **constraint graph**: primary content needs, minimum/maximum measures, relationships that must stay adjacent, regions that may reflow/reorder, sticky/overlay constraints, safe areas, text expansion, media aspect, interaction targets and platform chrome. Start from content/task constraints before choosing a familiar dashboard skeleton.

Prefer **intrinsic sizing** where possible: let content min/max constraints, `min-content/max-content`, flexible tracks and aspect behavior determine dimensions rather than fixed heights built for demo copy. Explicitly identify regions that must scroll independently and why.

Use a **content-driven breakpoint** when a relationship fails—not merely 640/768/1024 because a framework ships those values. Record the failure: comparison no longer fits, labels collide, target size becomes unsafe, reading measure grows too long, or hierarchy order becomes ambiguous.

Budget asymmetry with an **asymmetry budget**. Asymmetry can create direction, editorial character, drama and product specificity, but each imbalance should be anchored by hierarchy or content. Random offsets create novelty without coherence.

Define a **layout failure envelope**: smallest/largest supported dimensions, text scaling, longest expected strings, missing/overflowing data, keyboard/virtual keyboard, safe-area/system overlays, split-screen/fold posture, and any large-display behavior. Layout is not complete until the primary task survives the envelope.

Spatial dramaturgy can transform the constraint graph, but cannot break information architecture or reachability. High-ambition layout should find authored large-scale relationships—fields, stages, rails, canvases, editorial columns, layered instruments—not just decorate a 12-column grid.

### Falsification
Replace production content with extreme fixtures and compare DOM/visual order. If the composition only works with short English labels or exact card counts, it is overfit. Remove decorative regions: if the hierarchy collapses, confirm whether they were actually doing structural work that should be encoded directly.

### Recovery
When responsive patches accumulate, recompose from task relationships rather than adding another breakpoint. When composition feels generic, revisit primary object and spatial dramaturgy before increasing decorative complexity.

