UI Vault Workflow
Follow the 6-Layer Composition Stack (Layout + Style + Typography + Texture + Telemetry + Animations) whenever designing or building an interface from this vault:
- Read
relations.jsonfirst. Locate the requested base style, layout shell, typography system, surface texture, telemetry charts, or hybrid recipe before writing any CSS or JSX. - Respect tier boundaries & compatibility. Default to
productionfoundations for mainstream SaaS/apps, layer at most 1–2 restrainedviralaccents, and reserveexperimentalaesthetics for portfolios, creative labs, or explicit user requests. VerifypairsWithacross all 6 kinds and never mix entries listed inclashesWithunless explicitly asked. - Compose the 6 layers cleanly:
- Layer 1 — Layout Shell (
layouts/): Pick a container-query (@container) skeleton fromlayouts/<id>/driven by--lay-*tokens with zero hardcoded hex colors, zero100vhlocks, and composable ReactNode slots. - Layer 2 — Base Style (
styles/): ReadSTYLE.mdandtokens.cssas the source of truth for palette, surface elevation, border width/radius, and forbidden anti-patterns. - Layer 3 — Typography System (
typography/): Optionally override with a scoped fluid typography package (.type-<id>intypography.css) usingclamp()scales,tabular-nums, andtext-wrap: balance. - Layer 4 — Surface Texture (
textures/): Optionally layer a zero-JS adaptive texture (.tx-<id>) parameterized by--tx-color,--tx-opacity, and--tx-size. Mount structural ground textures behind cards (z-index: 0) and atmospheric overlays (film-grain,crt-scanlines,radial-vignette) as full-surfacepointer-events: nonelayers. - Layer 5 — Telemetry Micro-Charts (
telemetry/): Drop zero-dependency SVG/React micro-charts into KPI, observability, or AI workbench slots driven by adaptive--tel-*tokens (with WCAG-safe darkened semantic tokens on light grounds). - Layer 6 — Animations (
animations/): Prefer components already inanimations/(or install vianpx shadcn@latest add Aidilzin/ui-vault/<item>). CheckexternalRegistriesinrelations.jsonbefore hand-rolling motion code.
- Layer 1 — Layout Shell (
- Enforce motion & responsive hygiene. Every animated or telemetry primitive must:
- Honor
prefers-reduced-motion: reduceusing the fallback specified inrelations.json. - Use responsive
viewBox+width="100%"(orResizeObserver+devicePixelRatiofor Canvas) with bounded hover readouts so zero horizontal overflow occurs at390px.
- Honor
Ingesting New Vault Items
Adding a Style (styles/)
- Extract tokens with Dembrandt MCP, assign a cluster & tier, author
STYLE.md+tokens.css, register inrelations.jsonandstyles/registry.json, and add a swatch inplayground/src/swatches/.
Adding a Layout Shell (layouts/)
- Create
layouts/<id>/<id>.tsx,layouts/<id>/<id>.css, andlayouts/<id>/LAYOUT.md(with YAML frontmatterid,name,tier,pattern,slots,pairsWith,clashesWith). - Enforce zero hardcoded palette colors (use
--lay-*tokens),container-type: inline-sizewith@containerbreakpoints,min-height: var(--lay-height, 100%)(no100vhorposition: fixed), and no relative./<id>.cssimport inside.tsx. - Register in
layouts/registry.json(type: "registry:item", CLIlayout-<id>) andrelations.json.
Adding a Telemetry Micro-Chart (telemetry/)
- Create a zero-dependency strict-TypeScript
telemetry/<id>.tsxusing--tel-*tokens, responsiveviewBox+width="100%", stricttabular-nums, bounded hover inspection, ARIA labels, and explicitprefers-reduced-motionfallback. - Register in
telemetry/registry.json(type: "registry:item", CLItelemetry-<id>,dependencies: []) andrelations.json.
Adding a Surface Texture (textures/) or Typography System (typography/)
- Follow adaptive
--tx-color/mask-image/::beforescoping for textures (textures/registry.json) and scoped.type-<id>fluidclamp()tokens for typography (typography/registry.json).
Adding an Animation (animations/)
- Place under
animations/<mechanic>/<id>.tsx(or.css), enforce MIT/Apache-2.0/clean-room license hygiene andprefers-reduced-motion: reduce, register inanimations/registry.jsonandrelations.json, and wire intoplayground/src/demos/.
Verification Gate (Before Pushing to main)
Run all checks locally (npm run sync:readme regenerates both README.md dynamic blocks and all docs/catalog/*.md pages):
npm run typecheck
npm run validate:registry
npm run check:vault
npm run sync:readme
npm run build:playground