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
Common Patterns

Forms that wire themselves

Use Field, Fieldset, SubmitButton and FormErrorSummary inside Form to get accessible labels, hints, errors, pending state and an error summary without hand-written ids.
Updated 27 days ago
Waitlist & coming soon
An icon rail that opens on hover
6 min · Pattern · Forms
Since 2.3, Once UI has form building blocks: Field wires labels, hints and errors to a control, Fieldset groups sections, SubmitButton handles pending state, and FormErrorSummary lists what went wrong.

Why hand-built forms break

The Form layout pattern stacks a label, an input and a helper line in a Column. It looks right, but every field needs ids kept in sync by hand: the label points at the input, and the input needs aria-describedby pointing at the hint and the error. When that bookkeeping drifts, nothing looks wrong. The error is on screen and a screen reader never announces it. @once-ui-system/core 2.3 adds four components that do the wiring for you: Field, Fieldset, SubmitButton and FormErrorSummary. They all work inside Form.

Field: label, hint and error in one place

Wrap one control in a Field. It gives the control its id, aria-describedby, aria-invalid and aria-required, merged with whatever the control already has.
<Field label="Email" hint="We only use it for receipts." error={errors.email} required>
  <Input id="email" type="email" />
</Field>
If the control already has an id, Field uses it, so you don't repeat it. While error is set the control is marked invalid. Input and Textarea, and the fields built on them such as Select, PasswordInput and NumberInput, pick that up and draw their error styling, so you don't pass a separate prop to the input. The hint stays visible next to the error, so the instruction is still there when someone goes back to fix the value. For a custom control, pass a function as the child. It receives the same attributes to spread where you need them. Inside your own component, useField() returns the same state.

Form: one decision for spacing

Form lays fields out on a grid. density decides both the gap and how the fields read:
  • "stacked" fuses the fields into one block. Shared borders collapse to a single hairline and only the outer corners stay round.
  • "tight" (the default) and "spacious" are ordinary gaps where every field keeps its own border.
columns takes a number or a per-breakpoint map, and span on a Field makes it take more than one column:
<Form density="stacked" columns={{ xs: 1, m: 2 }}>
  <Field label="First name"><Input id="first" /></Field>
  <Field label="Last name"><Input id="last" /></Field>
  <Field label="Email" span={2}><Input id="email" type="email" /></Field>
</Form>
You never write corners="top" or corners="bottom" by hand. Form works out the corners from the fields that actually rendered, at every breakpoint, so hiding a field or changing the column count doesn't leave a square edge at the end of the group. size on the form sets the default size for every field inside it, and a field that sets its own size keeps it.

Fieldset: titled sections

A Fieldset is a real <fieldset> with a <legend>, so screen readers announce the section name when you enter it. It takes the same density and columns as Form, and disabled turns off every native control inside at once.
<Fieldset legend="Billing address" description="Where we send invoices." columns={2}>
  <Field label="Street" span={2}><Input id="street" /></Field>
  <Field label="City"><Input id="city" /></Field>
  <Field label="Postcode"><Input id="postcode" /></Field>
</Fieldset>
Inside an outer Form, span on the Fieldset sets how many columns the section takes, and the outer form's size carries in.

SubmitButton: no double submits

Render the form as a real <form> with as="form". If onSubmit returns a promise, the form is pending until it settles. While it's pending the form is aria-busy, a second submit from Enter or a second click is dropped, and SubmitButton shows a spinner.
<Form as="form" onSubmit={async (event) => {
  event.preventDefault();
  await saveProfile(new FormData(event.currentTarget));
}}>
  <Field label="Display name"><Input id="name" name="name" /></Field>
  <SubmitButton pendingLabel="Saving…">Save</SubmitButton>
</Form>
If the submit doesn't go through onSubmit, for example a server action or a mutation hook, pass pending to the Form yourself. While pending, the button uses aria-disabled rather than disabled, so a keyboard user keeps focus on it instead of being dropped back to the top of the page.

FormErrorSummary: after a failed submit

Per-field errors only help someone who scrolls past each field. FormErrorSummary lists them all in one place. It takes a map from control id to message, the shape most validation libraries return, or a list of { id, message }:
<Form as="form" onSubmit={handleSubmit}>
  <FormErrorSummary errors={errors} span={2} />
  {/* fields */}
</Form>
It renders nothing while there are no errors, so it can stay in the form permanently. When errors appear or change, it takes focus, so keyboard and screen-reader users land on it instead of staying on the submit button with no idea why nothing happened. Each entry links to its field, and choosing it moves focus into the control. The default heading is "Check the highlighted fields". Change it with title, and turn the focus behaviour off with autoFocus={false}.

Write this / not this

Do
Avoid
<Field label hint error> around the input
A Text label and hint with ids kept in sync by hand
Form density="stacked"
corners="top" and corners="bottom" written down the stack
in

Reference

Every prop is documented in the Field page of the Once UI docs, alongside the pages for Form, Fieldset, SubmitButton and FormErrorSummary.
error
SubmitButton
Form as="form"
A Button with a loading flag you reset yourself
FormErrorSummary errors={errors}
Errors that only show next to fields off screen
Hero sectionHero composition — eyebrow, headline, actions, and optional ambient glow.
Static panelThe surface recipe for non-interactive panels — stats, settings, feature boxes.
Form layoutStack fields, group sections, and place actions in Once UI forms.
Highlighted cardInteractive Card with brand glow for featured pricing tiers and CTAs.
Responsive stackingBreakpoint props for mobile stacking — no media queries needed.
Decoration layersAbsolute Background layers, glow budget, and placement rules.
Dialog & modalControlled dialogs with title, footer actions, and stacked multi-step flows.
Toast & feedbackGlobal toast notifications via ToastProvider and useToast — plus when to use inline Feedback.
Tables & listsStructured data with Table, simpler stacks with List — plus empty and loading states.
Loading statesSkeleton placeholders for content areas, spinners for actions — keep layout stable while data loads.
App shell navigationSticky headers, MegaMenu, Kbar command palette, and Pro block app chrome.
Dashboard & chartsKPI stat rows, CountFx viewport latches, sparkline charts, and activity tables.
Chat & messagingMulti-pane chat layouts with channel sidebars, feeds, composers, and streaming replies.
Auth & verificationSplit sign-up layouts, social auth, PasswordInput, and OTP verification in stacked dialogs.
Settings & split panelsSplitView settings layout with section sidebar, form panels, toggles, and danger zones.
Data filters & toolbarCompose table toolbars with search, SegmentedControl view switchers, date ranges, and filter chips.
Command paletteWire the Kbar module for searchable navigation, actions, and keyboard shortcuts in your app shell.
Pricing & plansThree-tier pricing grids, billing toggles, comparison tables, and FAQ accordions from the pricing task bundle.
Accordion & FAQAccordionGroup for FAQ sections, split-column layouts, autoCollapse behavior, and standalone Accordion usage.
Media & uploadsMediaUpload drag-and-drop, compression, preview, and profile photo patterns in settings forms.
Empty & error statesCompose empty, error, and filtered-empty states with Icon, Heading, Text, and Button — distinct from loading skeletons.
SEO, Open Graph, and structured datagenerateMetadata, Schema JSON-LD, and server-side OG fetch — wire once in your layout.
Documentation code blocks with live previewCodeBlock with prismjs, multi-file tabs, diff view, and side-by-side preview.
Carousels, galleries, and before/after comparisonsCarousel for rotators and galleries; CompareImage for draggable A/B sliders.
Date pickers and schedulingDateInput for single dates, DateRangePicker for ranges — calendar UI with optional time selection.
Context menus and dropdown actionsRight-click ContextMenu and click Dropdown patterns for contextual actions without cluttering the UI.
Tags, chips, and multi-value inputsTagInput, Chip, Tag, and Checkbox patterns for filters, labels, and multi-select form fields.
Roadmap & kanbanStatus columns, task cards, StatusIndicator dots, and the roadmap task bundle — Roadmap1 Pro block as gold reference.
Form inputs & controlsSelect, Switch, Checkbox, RadioButton, Textarea, and NumberInput — field types beyond basic Input stacking.
Progress, status & badgesProgressBar for completion, StatusIndicator for state dots, Badge for counts and labels.
Scrolling & feedsScroller for horizontal chip rails, InfiniteScroll for paginated feeds, and overflow patterns without scroll traps.
Profile, avatars & identityAvatar sizes, status indicators, profile headers, AvatarGroup stacks, and member list rows.
Social proof & logo cloudsLogoCloud rotation, static partner grids, testimonial panels, and trust strips under heroes.
Masonry & media gridsMasonryGrid for variable-height galleries; Grid vs masonry decision tree and portfolio cells.
Table pagination, search & bulk selectionTable1 Pro block patterns — search, page size, pagination footer, and bulk action bars.
Banners & announcementsFull-width Banner strips for product news, maintenance windows, and dismissible upgrade prompts.
Footer layoutsMinimal bars, CTA closers, and multi-column sitemap grids — Footer1–4 Pro block patterns.
Onboarding & first runWelcome dialogs, setup checklists, guided empty dashboards, and profile completion nudges.
Waitlist & coming soonCentered hero, email capture, RevealFx entry, and subscriber trust rows from Waitlist1.
Forms that wire themselvesUse Field, Fieldset, SubmitButton and FormErrorSummary inside Form to get accessible labels, hints, errors, pending state and an error summary without hand-written ids.
An icon rail that opens on hoverUse Nav's collapsed, expandOnHover and expandedWidth props to build an editor-style icon rail that opens over the page instead of showing a tooltip per icon.
Maps without an API keyHow to put an interactive, theme-aware map on a page with Once UI's Map module: markers from data, clustering, popups, areas, and the props that keep it friendly on long pages.
Segmented controls that slideHow to set up SegmentedControl: the sliding selection, tabs versus radio semantics, a non-scrolling row for narrow sidebars, and a second line of description per option.
One EmptyState for every blank screenHow to use the EmptyState component: picking a size for a page, card or table, a Mascot or icon above the title, the right heading level, and how to write the title, line and action.