unprompted-ui — Interface Composition, Motion & Web Vitals
Extends core rules U-01–U-04, U-12–U-21, and U-29–U-34. Do not duplicate core checks; apply the structural engineering rules below whenever building visual interfaces.
1. Check Direction First (U-12)
- Look for
DESIGN.mdat the workspace root (or design tokens already committed in CSS/Tailwind config). - If present, obey its palette, font stack, border radii, and grid proportions strictly.
- If absent on a greenfield UI task, either invoke
unprompted-directionto establishDESIGN.mdwith the user, or strip all decorative invention, use a neutral architectural baseline, and mark the Delivery GateDRAFT (NO DESIGN.MD).
2. Spatial Composition & Anti-Template Choreography (U-04, U-13, U-29, U-31)
Replace Predictable Blocks
- Hero Sections: Never stack centered badge + centered gradient H1 + centered dual buttons. Choose a layout dictated by the product's primary proof:
- Asymmetric Split (
7fr / 5fror8fr / 4fr): Left-aligned statement paired with an interactive product state, live telemetry table, or cropped interface frame. - Editorial Masthead: Full-width typographic headline anchored to a crisp
1pxtop/bottom rule with structured metadata columns underneath. - Workspace-First: For tools, calculators, and utilities, open directly into the working instrument with zero marketing preamble.
- Asymmetric Split (
- Feature & Capability Sections:
- Replace 3 equal floating drop-shadow cards (
U-13) with a shared-hairline matrix (display: grid; gap: 1px; background: var(--border-hairline)), a sticky-left narrative + scrolling-right proof rail, or a numbered specification index (01,02,03).
- Replace 3 equal floating drop-shadow cards (
- Bento Discipline: Only use multi-span bento cells when each cell renders genuinely heterogeneous data density (e.g., a wide time-series chart beside a narrow latency counter)—never stuff uniform text blurbs into arbitrary
col-span-2boxes.
3. Surface, Border & Chromatic Restraint (U-01–U-03, U-14, U-15, U-30)
- 90 / 10 Chromatic Budget:
>= 90%of viewport area belongs to calibrated neutral surfaces and ink;<= 10%belongs to the primary brand/signal accent. - Tonal Separation Over Shadows: Establish depth primarily via subtle surface luminance shifts (
--bg-canvas->--bg-surface->--bg-subtle) and1pxhairlines (10%–14%foreground alpha) rather than heavy multi-layer drop shadows. - Semantic Status Colors: Keep destructive (red), warning (amber), and success (green) tokens reserved strictly for real system states—never spend them as random decorative icon backgrounds.
- SVG & Icon Restraint (
U-37): Most headings and feature descriptions need zero icons. Never hand-write decorative<svg>paths from memory, never use 4-point AI sparkle/rocket/lightning badges, and never repeatw-10 h-10 rounded-xl bg-accent/10icon boxes across a grid. Use established icon libraries (Phosphor,Radix,Lucide,Tabler) strictly for interactive affordances (16px–20px, uniform stroke width,currentColor). - Data-Viz Restraint (
U-38): Render charts, progress bars, and allocation breakdowns in neutral ink/surface steps plus at most one accent color—never assign a different neon hue to every row or ring. - Concentric Radii (
U-30): Outer container radius equals inner child radius plus container padding (R_outer = R_inner + P). Prefer crisp radii (0px–10px) unlessDESIGN.mdspecifies pill/organic geometry.
4. Typographic Mechanics (U-16–U-18, U-33)
- Role Separation: Assign clear structural roles—Display (headlines), Sans (controls & prose), Monospace (timestamps, IDs, code, metrics). Never set an entire page in weight-600
Inter. - Optical Scale:
- Display (
>= 2.5rem):line-height: 1.0–1.08,letter-spacing: -0.028emto-0.04em,text-wrap: balance. - Section Title (
1.5rem–2.25rem):line-height: 1.12–1.2,letter-spacing: -0.02em. - Metadata / Eyebrow (
0.72rem–0.78rem): uppercase,letter-spacing: 0.06em–0.1em, zero emojis. - Prose (
0.95rem–1.06rem):line-height: 1.55–1.68,max-width: 60ch–66ch,text-wrap: pretty. - Numeric Values (
U-18):font-variant-numeric: tabular-nums lining-nums.
- Display (
5. Motion & Core Web Vitals (U-19–U-21, U-32, U-34)
- Compositor-Friendly Motion: Animate
transformandopacity(and crisp120ms–180mscolor/border shifts on controls). Use fast-out settling curves (cubic-bezier(0.22, 1, 0.36, 1)). - Tactile Feedback (
U-32): Buttons and clickable rows need distinct:hover,:active(transform: translateY(1px)),:focus-visible, and:disabledstates. - Performance Baseline:
LCP: Never hide above-the-fold hero copy or primary imagery behindopacity: 0entrance animations or client-only JS hydration delays; preload or prioritize the hero image (fetchpriority="high"), lazy-load offscreen media (loading="lazy").CLS(U-34): Reserve exact aspect-ratio boxes for every image, icon, font fallback, and async skeleton.INP: Keep click/input handlers free of synchronous layout thrashing; debounce expensive filter/search recalculations.
See deeper examples in ../unprompted/references/typography-and-color-tokens.md and ../unprompted/references/layouts-and-microinteractions.md.


