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

Common gotchas

Codegen mistakes from gotchas.json — layout, surfaces, motion, and component traps.
Updated 19d ago
Typography scale
Block anchors
6 min · For agents
The gotchas.json file encodes mistakes that pass TypeScript but render wrong. Load relevant entries before codegen — not the full docs site.

Where gotchas live

@once-ui-system/core/ai/gotchas.json
Each entry has a rule, affected components, and a dot-notation key (e.g. Card.interactive). After picking a task bundle, load only the gotcha keys listed in that bundle. Hosted copy: docs.once-ui.com/ai/gotchas.json

Layout gotchas

Key
Rule
`layout.shorthands`Use `fill` not `fillWidth fillHeight`; `center` not `horizontal="center" vertical="center"`; `Row`/`Column` not `Flex direction=`
`layout.defaults`Never write props equal to defaults: `position="relative"`, `direction` on Row/Column, `variant="primary"` on Button
`section.gaps`Gap between page sections: 80–160 (typical 104). Inside sections: 24–40. Never 48 between major sections

Surface gotchas

Key
Rule
`Card.interactive``Card` is for interactive surfaces only (`href` or `onClick`). Static panels use the Column surface recipe
`color.tokens`Colors are semantic tokens (`{scheme}-{weight}`), never hex/rgb
`color.background-weak``*-background-weak` is nearly the page color — use alpha tokens (`brand-alpha-medium`) for glows

Decoration gotchas

Key
Rule
`Background.absolute`Every absolute decorative layer needs `top="0" left="0"` or it offsets by parent padding
`Background.gradient.width`Quarter-percent units: 400 = 100%. Soft glows use width 100–200, not 500
`overflow.hero``overflow="hidden"` on full-bleed sections clips glows into hard bands

Motion gotchas

Key
Rule
`RevealFx.delay`Delay is in **seconds** — stagger with `delay={index * 0.1}`, never `index * 80`
`RevealFx.translateY`Number = rem. Use `translateY={1}` or token `"16"`; bare `16` means 16rem
`CountFx.trigger`No `trigger` prop — drive `value` from a `useInViewport` latch
`animation.budget`Entry animation budget: hero + at most 1–2 key moments per page

Component gotchas

Key
Rule
`Icon.names`Icon names must come from `IconName` in spec.json — never invent
`Badge.duplicate`Don't pass the same text as both `title` prop and children
`Tag.duplicate`Don't pass the same text as both `label` prop and children
`Fade.edge``Fade` is an edge overlay strip on scroll containers, not a content wrapper
`LogoCloud.columns`Always set `columns` and responsive overrides or logos stack in one column
`StatusIndicator.color`Uses `color="green"` etc. — not variant or scheme names

Validation workflow

After generating TSX, run:
pnpm validate-ai-code path/to/file.tsx
This catches shorthand mistakes, hex colors, invented icons, and redundant default props — the same issues gotchas.json prevents at generation time.

Context budget tip

Approach
Context cost
Load `gotchas.json` entries for your task~0.5KB
Load full component doc page10–50KB
Load `rules.compact.md` + task bundle + targeted gotchas**~4KB total**

Related

→ Harness overview → Icons & buttons → Column, not Flex → Source: gotchas.json