Once UI Handbook
Beginner Guides
What is Once UI?
Install & config
Page skeleton
Your first page
Build And Launch
How to launch a portfolio site that actually gets you hired
How to build a documentation site with MDX and Next.js
How to ship a landing page and dashboard with authentication in Next.js
How to launch a social app with Next.js and Supabase
Vibe Coding
Introduction to vibe coding
Set up your local dev environment
Essential tools for vibe coding
Build your first Once UI app
Common Patterns
Hero section
Static panel
Form layout
Highlighted card
Responsive stacking
Decoration layers
Dialog & modal
Toast & feedback
Tables & lists
Loading states
App shell navigation
Dashboard & charts
Chat & messaging
Auth & verification
Settings & split panels
Data filters & toolbar
Command palette
Pricing & plans
Accordion & FAQ
Media & uploads
Empty & error states
SEO, Open Graph, and structured data
Documentation code blocks with live preview
Carousels, galleries, and before/after comparisons
Date pickers and scheduling
Context menus and dropdown actions
Tags, chips, and multi-value inputs
Roadmap & kanban
Form inputs & controls
Progress, status & badges
Scrolling & feeds
Profile, avatars & identity
Social proof & logo clouds
Masonry & media grids
Table pagination, search & bulk selection
Banners & announcements
Footer layouts
Onboarding & first run
Waitlist & coming soon
Design Tips
Color & surfaces
Harness overview
Row, Column & Grid
Spacing & rhythm
Icons & buttons
Reveal & motion
Theme tokens, FOUC-free init, and runtime style controls
Tooltips and hover cards
Block updates
Block updates changelog
Agent Resources
Column, not Flex
Semantics over CSS
Typography scale
Common gotchas
Block anchors
Validate generated code
Pro block registry
Match task bundles
TrademarkTrademark
Ctrl k
Search...
Sign up
Once UI Handbook
Beginner Guides
What is Once UI?
Install & config
Page skeleton
Your first page
Build And Launch
How to launch a portfolio site that actually gets you hired
How to build a documentation site with MDX and Next.js
How to ship a landing page and dashboard with authentication in Next.js
How to launch a social app with Next.js and Supabase
Vibe Coding
Introduction to vibe coding
Set up your local dev environment
Essential tools for vibe coding
Build your first Once UI app
Common Patterns
Hero section
Static panel
Form layout
Highlighted card
Responsive stacking
Decoration layers
Dialog & modal
Toast & feedback
Tables & lists
Loading states
App shell navigation
Dashboard & charts
Chat & messaging
Auth & verification
Settings & split panels
Data filters & toolbar
Command palette
Pricing & plans
Accordion & FAQ
Media & uploads
Empty & error states
SEO, Open Graph, and structured data
Documentation code blocks with live preview
Carousels, galleries, and before/after comparisons
Date pickers and scheduling
Context menus and dropdown actions
Tags, chips, and multi-value inputs
Roadmap & kanban
Form inputs & controls
Progress, status & badges
Scrolling & feeds
Profile, avatars & identity
Social proof & logo clouds
Masonry & media grids
Table pagination, search & bulk selection
Banners & announcements
Footer layouts
Onboarding & first run
Waitlist & coming soon
Design Tips
Color & surfaces
Harness overview
Row, Column & Grid
Spacing & rhythm
Icons & buttons
Reveal & motion
Theme tokens, FOUC-free init, and runtime style controls
Tooltips and hover cards
Block updates
Block updates changelog
Agent Resources
Column, not Flex
Semantics over CSS
Typography scale
Common gotchas
Block anchors
Validate generated code
Pro block registry
Match task bundles
TrademarkTrademark
Once UIDocumentationBlog
© Once UI. All rights reserved.
Built with Aveiro

Match task bundles

Route user intent to harness task bundles, gold examples, and Pro blocks.
Updated 19d ago
Pro block registry
6 min · For agents
After loading rules.compact.md, resolve user intent to a task bundle. Each bundle lists components, gotchas, gold examples, and Pro blocks — your blueprint for production-quality output.

Why task bundles exist

Full component docs are 10–50KB each. Task bundles are ~1KB intent maps that tell you exactly what to load for a given UI type. Entry point: packages/core/ai/manifest.json → "resolve": "tasks/index.json"

The seven bundles

User says…
Bundle
Gold example
Primary blocks
"landing page", "hero"marketing-hero.jsonexamples/marketing-hero.tsxHero1, Header1
"pricing", "plans"pricing.jsonexamples/pricing.tsxPricing1, Pricing2
"settings", "preferences"settings.jsonexamples/settings.tsxSettings1, Sidebar2
"dashboard", "analytics"dashboard.jsonexamples/dashboard.tsxDashboard1, Table1
"chat", "messaging"chat.jsonexamples/chat.tsxChat1, Feed3, Sidebar4
"login", "signup", "auth"auth.jsonexamples/auth.tsxAuth1, Auth2
"roadmap", "kanban"roadmap.jsonexamples/roadmap.tsxRoadmap1

Resolution workflow

1. Load rules.compact.md + catalog.json (always, ~6KB) 2. Read tasks/index.json (match intent) 3. Open the matched task/*.json (~1KB) 4. Fetch component slices from components/ (on demand) 5. Read gold example + Pro block (structure) 6. Load gotchas.json entries listed in bundle (avoid traps) 7. Generate TSX 8. Run: pnpm validate-ai-code path/to/file.tsx

What each bundle contains

Every tasks/*.json file has the same shape:
{
  "id": "dashboard",
  "title": "Analytics dashboard",
  "description": "KPI stat cards, charts area, recent-activity list",
  "components": ["Column", "Grid", "Table", ...],
  "recipes": ["reveal-stagger"],
  "example": "examples/dashboard.tsx",
  "blocks": {
    "primary": ["Dashboard1", "Table1"],
    "compose": ["Header1", "Sidebar1"]
  },
  "gotchas": ["Card.interactive", "CountFx.trigger", ...],
  "quality": {
    "statCard": "Column surface recipe — not Card"
  }
}
Field
Use it for
componentsWhich components/{Name}.json slices to fetch
recipesSections in recipes.md for composition patterns
exampleGold TSX — copy structure, not verbatim
blocks.primaryMain Pro blocks to install or reference
blocks.composeApp shell blocks (header, sidebar)
gotchasKeys to look up in gotchas.json
qualityNon-negotiable rules for this UI type

Pro block registry

Blocks live in packages/core/ai/examples/blocks/. The manifest at examples/blocks/manifest.json maps blocks to tasks via byTask:
Install blocks into a project:
Then adapt imports — blocks are starting points, not drop-in without customization.

Ambiguous intent

When the request spans multiple bundles, pick the primary surface and compose:
Request
Primary bundle
Compose from
"Dashboard with chat"dashboard.jsonchat.json blocks for a chat widget
"Pricing landing page"marketing-hero.jsonpricing.json for the plans section
"Settings with auth gate"auth.jsonsettings.json for the panel
Load both bundles' gotcha lists. Generate the primary surface first, then add secondary sections.

Context budget

Artifact
Size
Load when
rules.compact.md~2KBAlways
catalog.json~4KBComponent selection
Task bundle~1KBIntent matched
Component slice~0.5KB eachListed in bundle
Gold example2–5KBBefore generating
Pro block5–15KBWhen blocks.primary listed
Full doc page10–50KB**Never for codegen**
Target: under 15KB total context per generation task.

Validation

After generating, always run:
This catches Flex direction=, invented icon names, hex colors, and other rules from gotchas.json. See Validate generated code.

Humans vs agents

Question
Answer
"How should I think about this pattern?"Once UI Learn (this site)
"What props does a component accept?"docs.once-ui.com reference
"Build me a dashboard"Task bundle + gold example

Related

→ Harness overview → Common gotchas → Validate generated code → Full harness: docs.once-ui.com/once-ui/ai-coding
"byTask": {
  "dashboard": ["Dashboard1", "Header1", "Sidebar1", "Table1"],
  "chat": ["Chat1", "Feed3", "Sidebar4", "Sidebar5"]
}
npx once-ui add Dashboard1 Header1
pnpm validate-ai-code src/components/MyDashboard.tsx