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

Border radius & nested corners

T-shirt radius tokens, nested m-8 and m-4 corners that stay concentric, side overrides, and the data-border shape scale.
Updated 9 days ago
Tooltips and hover cards
Bring your own icons
5 min · Design · Foundations
Corners are tokens, not pixel guesses. Nested boxes use the -8 and -4 nest sizes so concentric radii look intentional.

The radius scale

radius on Flex, Row, Column, Card, and the rest takes a T-shirt size — the same model as spacing and type:
Token
Use
`none`Sharp corners
`xs` / `s`Compact chips, tight controls
`m`Default for cards and panels
`l` / `xl`Soft, friendly surfaces
`full`Pills and circular clips
Pick one size and stick to it across a surface family. Mixing xs cards with xl buttons reads as two products on one page.

Nested radius

When a rounded box sits inside another rounded box, the inner corner must be smaller than the outer one or the gap between them looks uneven. Once UI encodes that as nest suffixes on the same size:
  • {size}-8 — outer container padded with spacing token "8"
  • {size}-4 — middle layer padded with "4"
  • {size} — innermost content
The TypeScript type is a plain size (xs … xl, full, none) or that size plus a nest suffix (-4 or -8). So m-8, l-4, and xl-8 are valid; inventing m-12 is not. Match the nest number to the padding you actually use. An outer radius="m-8" with padding="24" will not look concentric — the nest tokens are tuned for "8" and "4" padding, the sizes you reach for most often when nesting.

One side or one corner

When only part of the box should round — a tab bar, a split card, a list row that shares edges — use the side and corner props instead of hacking CSS:
  • Sides: topRadius, rightRadius, bottomRadius, leftRadius
  • Corners: topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius
<Column
  padding="24"
  radius="m"
  border="neutral-medium"
  background="surface"
>
  Panel
</Column>
<Column padding="8" radius="m-8" background="neutral-alpha-weak">
  <Column padding="4" radius="m-4" background="surface">
    <Column padding="12" radius="m" border="neutral-medium">
      Nested content
    </Column>
  </Column>
</Column>
<Row
  border="neutral-medium"
  background="surface"
  topLeftRadius="m"
  topRightRadius="m"
  bottomLeftRadius="none"
  bottomRightRadius="none"
>
  Top of a stacked group
</Row>
These take plain size values (xs … xl, full, none). They do not take nest suffixes — nest only on the full radius prop.

Global shape with data-border

The app-wide shape language is not a prop on every component. It is a data attribute on a semantic ancestor (usually html, set by ThemeProvider / ThemeInit):
  • data-border="rounded" — balanced default
  • data-border="playful" — larger corners
  • data-border="conservative" — tighter corners
<div data-border="playful">
  <Column radius="m" padding="24" border="neutral-medium">
    Same radius="m", softer corners under playful
  </Column>
</div>
radius="m" still means medium relative to the active shape scale. Change data-border when the whole product should feel sharper or softer; change radius when one element needs to differ from its siblings.

Borders that go with the corner

Radius rarely travels alone. The same style props cover the stroke:
Prop
Values
`border`
Scheme token (`neutral-medium`, `brand-alpha-weak`, …), `surface`, `transparent`, or `true`
`borderWidth``1`, `2`, `4`, `8`
`borderStyle``solid` (default) or `dashed`
Side helpers (borderTop, borderX, …) accept the same colour tokens when only some edges need a stroke.

Write this / not this

Do
Avoid
`radius="m"``style={{ borderRadius: 12 }}`
`radius="m-8"` with `padding="8"`Same `radius="m"` on every nested box
`topLeftRadius="m"` for partial roundsCustom CSS classes for one corner
`data-border` for product-wide feel
Per-component pixel tweaks to match brand

More design tips

The full prop tables live in the Border docs. Theme-level data-border is covered with the other runtime style knobs in this section.