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
Agent Resources

Semantics over CSS

Style by meaning with design tokens — not arbitrary CSS values.
Updated 19d ago
Column, not Flex
Typography scale
TrademarkTrademark
Once UIDocumentationBlog
© Once UI. All rights reserved.
Built with Aveiro
5 min · Beginner · Foundations
Once UI props map to design tokens — not arbitrary CSS. This is what makes code predictable for humans and agents.

The idea

In Once UI, you style by meaning, not by value:
  • gap="16" — spacing from the token scale
  • background="surface" — semantic surface color
  • onBackground="neutral-weak" — text color that contrasts with the parent
You almost never write style={{ ... }}, class names, or hex colors. The prop is the design decision.

Token scales

Spacing — fixed steps, not free-form pixels:
"0" "1" "2" "4" "8" "12" "16" "20" "24" "32" "40" "48" "56" "64" "80" "104" "128" "160"
Colors — scheme + weight:
neutral-weak brand-medium danger-strong neutral-alpha-weak brand-alpha-medium
Also: surface, overlay, page, transparent for backgrounds. Typography — type + weight + size:
display-strong-l    heading-strong-m    body-default-s    label-default-xs

Props on layout components

Style surfaces directly on Row, Column, Grid — no wrapper needed:

Write this / not this

✅ Once UI way
❌ Common mistake
`background="brand-medium"``background: "#3b82f6"`
`gap="24"``gap: 22` or `gap: "1.5rem"`
`textVariant="display-strong-l"``fontSize: 32, fontWeight: 700`
`onBackground="neutral-weak"``color: "#666"`

Why agents care

The codegen harness (spec.json) encodes every valid token. When you use semantic props:
  • Agents can't invent invalid colors or spacing
  • validate-ai-code catches hex/rgb and wrong flex patterns
  • Refactors are prop renames, not CSS archaeology

Check yourself

  • No hex, rgb, or hsl in generated code
  • Spacing values come from the token scale
  • Text on layout uses textVariant + onBackground when possible

Next step

→ Row, Column & Grid
<Column
  background="surface"
  border="neutral-alpha-weak"
  radius="l"
  padding="24"
  gap="16"
  textVariant="label-default-s"
  onBackground="neutral-weak"
>
  Panel content without nesting Text for simple labels
</Column>