Quick TipThemingradiuscss-variablesdesign-tokensnuxt-ui

Change the Border Radius Everywhere in Nuxt UI

One CSS variable, --ui-radius, controls the corner rounding of every Nuxt UI component. Here's how the scale works and how to set it per color mode.

You don't need to override rounded-* classes component by component. Nuxt UI derives its whole radius scale from one variable, --ui-radius, so a single line changes every button, input, card, and modal.

Set it

/* app/assets/css/main.css */
@import "tailwindcss";
@import "@nuxt/ui";

:root {
  --ui-radius: 0.5rem;
}

The default is 0.25rem. Use 0 for square corners.

How the scale follows it

Nuxt UI redefines Tailwind's radius steps as multiples of --ui-radius:

UtilityValueUsed by (examples)
rounded-xscalc(var(--ui-radius) * 0.5)Small inner elements
rounded-smvar(--ui-radius)Badges (small sizes)
rounded-mdcalc(var(--ui-radius) * 1.5)Buttons, inputs, badges
rounded-lgcalc(var(--ui-radius) * 2)Cards
rounded-xlcalc(var(--ui-radius) * 3)
rounded-2xlcalc(var(--ui-radius) * 4)
rounded-3xlcalc(var(--ui-radius) * 6)

So with --ui-radius: 0.5rem, buttons get 0.75rem corners and cards get 1rem. Everything stays proportional, and your own markup follows the theme too as long as it uses these utilities.

A different radius in dark mode

The variable is plain CSS, so you can override it under .dark:

:root {
  --ui-radius: 0.25rem;
}

.dark {
  --ui-radius: 0.5rem;
}

Try values visually

Radius is hard to judge from numbers. In the Theme Builder, drag the Border Radius slider in the Layout section and watch buttons, cards, and full templates update. Light and dark mode each keep their own value, and the CSS export writes both.