Once UI Handbook
Vibe coding
Introduction to vibe coding
Set up your local dev environment
Essential tools for vibe coding
Build your first Once UI app
Getting started
What is Once UI?
Install & config
Page skeleton
Your first page
Upgrade from 1.8 to 2.0
Once UI without Next.js
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
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
Forms that wire themselves
An icon rail that opens on hover
Maps without an API key
Segmented controls that slide
One EmptyState for every blank screen
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
Border radius & nested corners
Bring your own icons
Give one section its own style
Override Once UI styles without !important
A logo before you have one
Agent resources
Column, not Flex
Semantics over CSS
Typography scale
Common gotchas
Block anchors
Validate generated code
Pro block registry
Match task bundles
Block updates
Block updates changelog
TrademarkTrademark
Ctrl k
Search…
Sign up
Once UI Handbook
Vibe coding
Introduction to vibe coding
Set up your local dev environment
Essential tools for vibe coding
Build your first Once UI app
Getting started
What is Once UI?
Install & config
Page skeleton
Your first page
Upgrade from 1.8 to 2.0
Once UI without Next.js
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
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
Forms that wire themselves
An icon rail that opens on hover
Maps without an API key
Segmented controls that slide
One EmptyState for every blank screen
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
Border radius & nested corners
Bring your own icons
Give one section its own style
Override Once UI styles without !important
A logo before you have one
Agent resources
Column, not Flex
Semantics over CSS
Typography scale
Common gotchas
Block anchors
Validate generated code
Pro block registry
Match task bundles
Block updates
Block updates changelog
TrademarkTrademark
Once UIDocumentationBlog
© Once UI. All rights reserved.
Built with Aveiro
Design Tips

Give one section its own style

Recolour a section with a nested data-brand, data-accent or data-neutral, or wrap it in StyleScope to give it its own seed colour, theme, border and fonts.
Updated 20 days ago
Bring your own icons
Override Once UI styles without !important
4 min · Design · Theming
Since 2.6, a section can carry its own brand, neutral, theme and fonts, so a client's page or a site preview can sit inside your app without touching the rest of it.

When one page needs two looks

Once UI's style lives in data-* attributes on <html>. That's fine until part of a page needs a different look: a site builder previewing a customer's site, a tenant's page inside a shared app, or a testimonial slide in a client's colours. @once-ui-system/core 2.6 handles this in two ways. For a named scheme, put the attribute on the section. For anything more, wrap the section in StyleScope.

A named colour: set the attribute

A nested data-brand, data-accent or data-neutral now recolours its subtree by itself. Before 2.6 the tokens were resolved on <html>, so a section with only data-brand="red" kept the page's brand unless you also set data-theme on it. That extra attribute isn't needed anymore.
<Column data-brand="red" data-accent="red" data-neutral="sand" padding="24">
  <Button label="Book a table" />
</Column>
Brand and accent solids, backgrounds, alpha steps, borders and --page-background all follow the section.

Anything more: StyleScope

When the look comes from a stored config, such as a seed colour, a pinned theme, a border style or different fonts, use StyleScope. It's a Column that takes the same keys as the style part of once-ui.config, so you can pass a saved site style straight in.
import { StyleScope } from "@once-ui-system/core";

<StyleScope
  config={{ brandSeed: "#B4541F", neutral: "sand", theme: "light", border: "playful" }}
  fonts={{ heading: "var(--font-serif)" }}
>
  <Heading variant="display-strong-s">Fresh bread every morning</Heading>
</StyleScope>
  • config takes brand, accent, neutral, solid, solidStyle, border and surface, the *Seed and *Scale keys, pageBackground and surfaceBackground, plus theme. A light or theme pins the subtree, and leaving it unset follows the page.
Settings that only make sense for the whole page, like scaling, device font sizes and transitions, stay on the root config.

Why it doesn't flash

StyleScope is a server component. It writes its scheme into a small <style> rule keyed to that element, not an inline style, so the HTML already carries the right colours and the first paint is correct. Config values go through the same check the theme uses, so a stored config can't inject CSS of its own.

Write this / not this

Do
Avoid
data-brand on the section
Adding data-theme just to make it recolour
StyleScope with a saved style config
Hand-copying CSS variables onto a wrapper
fonts on the scopeOverriding font-family in a stylesheet

One thing to watch

A nested data-theme inside a scope still takes the page's data-solid style unless it sets data-solid itself. If a dark card inside a light scope looks off, set both. For how the page-level attributes get applied in the first place, read the theme tokens page in this section.
dark
  • fonts sets a font-family per role: heading, body, label and code. Roles you leave out keep the page's fonts.
  • A seed or scale becomes a custom scheme for that element only. Two scopes with different brands can sit side by side on one page.
  • Color & surfacesColor schemes, the static panel recipe, and when to use Card.
    Spacing & rhythmSection gaps, inner gaps, and the spacing token scale.
    Row, Column & GridLayout decision tree — when to use Row, Column, Flex, and Grid.
    Harness overviewAgent codegen workflow — bootstrap, task routing, and validation.
    Icons & buttonsValid icon names, prefixIcon patterns, semantic colors, and button variants.
    Reveal & motionRevealFx entry animation, CountFx pairing, and the ambient decoration budget.
    Theme tokens, FOUC-free init, and runtime style controlsThemeInit, ThemeProvider, data-* attributes, and DataThemeProvider for charts.
    Tooltips and hover cardsTooltip for inline hints; HoverCard for rich previews on hover — keep discoverability without modal noise.
    Border radius & nested cornersT-shirt radius tokens, nested m-8 and m-4 corners that stay concentric, side overrides, and the data-border shape scale.
    Bring your own iconsRegister react-icons, lucide or hand-written SVGs with IconProvider, type-check the new names with IconLibraryOverrides, and replace the icons Once UI components draw.
    Give one section its own styleRecolour a section with a nested data-brand, data-accent or data-neutral, or wrap it in StyleScope to give it its own seed colour, theme, border and fonts.
    Override Once UI styles without !importantHow Once UI's cascade layer lets your own CSS and Tailwind utilities override component styles, and what to check in your stylesheets when you upgrade.
    A logo before you have oneHow to give an app a clean mark before it has a designed logo with Logo's monogram prop, and how to turn a real SVG logo into a loading splash with LogoLoader.