v1.0

Rounded

Responsive, semantic border-radius tokens that scale corners across breakpoints.

Create UI ships a semantic border-radius scale, rounded-component-*. Ten tokens: eight scale with the viewport, two are fixed on purpose. A single class such as rounded-component-5xl resolves to one value on mobile, another on tablet, and another on desktop, so you set the intent once and the corners adapt on their own.

Responsive · 3 values
Mobile320 to 767px
24px
Tablet768 to 1279px
32px
Desktop1280px and up
48px

One class, three values. The outlined panel is your screen right now, so resize the window and watch it move.

2 media queries in the system, 0 in your markup

Why it helps

Responsive corners normally mean writing one class per breakpoint and keeping the jumps in sync by hand. The hero above, written without tokens:

Without semantic tokens
<div className="rounded-3xl md:rounded-4xl xl:rounded-5xl" />

With the semantic scale the same behavior collapses into one class:

With semantic tokens
<div className="rounded-component-5xl" />

The win is threefold:

  • One class, no per-breakpoint variants. You describe the role of the corner ("this is a large component radius"), not three separate pixel decisions.
  • Design-token alignment. The scale mirrors the Figma radius tokens, so corners stay consistent across components instead of drifting toward ad hoc values.
  • One-file retuning. Adjusting the scale is a single edit, not a find-and-replace across every component that hard-coded rounded-md md:rounded-lg.

Usage

Apply a token the same way you would any Tailwind radius utility:

<div className="rounded-component-lg bg-static p-component-lg">Card</div>
<button className="rounded-component-full px-component-lg">Pill button</button>

Controls hold, surfaces soften

The bare radius scale (rounded-sm, rounded-md, rounded-lg, and so on) is fixed at every breakpoint. Both scales are in use, and the split is deliberate:

  • Controls hold a fixed radius. Button and Input use the bare scale and Checkbox pins exact pixel radii, so a control's corner never resizes underneath the reader mid-scroll.
  • Surfaces soften on small screens. Modal and Sidebar round their panels with rounded-component-*, and DropdownMenu and Stepper use it on their items, because a 48px corner that reads as generous on a desktop card is overbearing on a phone.

Reach for rounded-component-* when you are drawing a surface, and the bare scale when you are drawing a control.

Token reference

Every token, with its corner magnified at each breakpoint so the small steps stay legible and the scaling is visible rather than asserted. Three windows mean the radius changes across breakpoints; one window means it is fixed everywhere. Clicking a token name copies its full utility class.

componentmobile · tablet · desktop, corners shown at 2×
0px
2pxMobile 2 pixels2pxTablet 2 pixels4pxDesktop 4 pixels
4pxMobile 4 pixels4pxTablet 4 pixels6pxDesktop 6 pixels
6pxMobile 6 pixels6pxTablet 6 pixels8pxDesktop 8 pixels
8pxMobile 8 pixels8pxTablet 8 pixels12pxDesktop 12 pixels
12pxMobile 12 pixels12pxTablet 12 pixels16pxDesktop 16 pixels
12pxMobile 12 pixels16pxTablet 16 pixels24pxDesktop 24 pixels
16pxMobile 16 pixels24pxTablet 24 pixels32pxDesktop 32 pixels
24pxMobile 24 pixels32pxTablet 32 pixels48pxDesktop 48 pixels
9999px

How it compiles to CSS

The CLI emits the desktop value into :root, then layers tablet and mobile overrides as max-width media queries. Take component-lg (6px mobile, 6px tablet, 8px desktop):

globals.css
:root {
  --radius-component-lg: 8px;
}
 
@media (max-width: 1279px) {
  :root {
    --radius-component-lg: 6px;
  }
}

Desktop (8px) is the base in :root. The 1279px query drops it to 6px for tablet and below. There is no 767px mobile block here because mobile (6px) already equals tablet.

The CLI also writes an @theme inline block registering each variable as a theme token, and that registration is what turns --radius-component-lg into the rounded-component-lg utility. A loose :root variable on its own generates nothing.

Customizing the scale

Override any --radius-component-* variable in your own globals.css, following the same pattern: the desktop value on :root, smaller ranges in the max-width blocks. The @theme inline block regenerates the matching utility, so nothing has to be rebuilt. To take an updated scale instead of keeping a local edit, re-run npx @create-ui/cli init.

Every one of these tokens ships with the components.Install Create UI