Skip to content

Blog

Base UI vs Radix in shadcn blocks: what compiles on each

Frank Spin7 min read

shadcn/ui now ships the same components on two headless libraries: Base UI (@base-ui/react) and Radix (radix-ui). The styles look alike, but the props underneath differ. If you install a block written for one into a project set up for the other, some of it won't compile. We wanted to know how much, so we tested our own catalogue.

Short answer: every themes.dev block, component and app screen is written for shadcn/ui's base-nova style, which is built on Base UI, and that is where we test and screenshot it. On 28 November 2026 we also typechecked all of it against shadcn's Radix components. 1,416 of 1,427 block files and 398 of 404 components compiled unchanged. The 197 app screens did not: they need Base UI. All 91 items in the free library passed on both.

Which one does your project use?#

Open components.json in the root of your project and look at style. A name that starts with base- (such as base-nova) means Base UI; radix- (such as radix-nova) or the older new-york and default mean Radix. Your package.json says the same thing: @base-ui/react or radix-ui (older projects have separate @radix-ui/react-* packages).

Since July 2026, npx shadcn@latest init without flags gives you Base UI; -b radix still gives you Radix. Our shadcn/ui guide covers that change.

How we tested#

We took the project where every UI Pro item is checked (Vite, React 19, shadcn 4.23.0, TypeScript 7.0.2 in strict mode) and copied in every block, component and app screen as a buyer would get them. On base-nova that is 2,029 files and 0 type errors. Then we set the style to radix-nova, re-added all 38 shadcn primitives those files import with npx shadcn add --overwrite, and ran tsc again. We did the same with the 91 free items from our public registry.

WhatFilesTypecheck unchanged on Radix
Blocks (with their shared parts)1,4271,416
Components404398
App screens and their shared shell19852, but the shell fails, so none of the 197 screens work as they are
Free library (blocks, components, templates)9191

A typecheck catches props that don't exist on the other library. It doesn't prove that a block looks and behaves the same, and we don't claim that: we only test and screenshot on Base UI. Treat the Radix column as "will compile", not as "tested".

The eleven blocks that fail are ten FAQ blocks (faq-19 to faq-24, faq-26, faq-29, faq-30 and faq-33) and one form, forms-27. The six components are avatar-03, commerce-05, commerce-09, multi-select-03, multi-select-06 and sign-in-button-04. Each block and component page now shows which group it is in, on the line called Primitives.

What actually differs#

The Radix run gave 331 type errors. 292 of them come from the differences below; the other 39 follow from them (37 callbacks whose parameter type was lost, two null values Radix's Select doesn't accept).

Base UIRadixErrors
render={<a href="…" />} to change the elementasChild with the element as the child113
<Select items={…}> so the trigger can show the labelNo items; SelectValue shows the chosen item's text81
<ToggleGroup> picks one by default, multiple for severaltype="single" or type="multiple" is required43
<Checkbox indeterminate />, onCheckedChange gives a booleanchecked="indeterminate"; the callback can also give "indeterminate"24
<Accordion defaultValue={["a"]}>, multiple to open severaltype="single" (plus collapsible) or type="multiple" is required11
hiddenUntilFound on accordion panels, so the browser's find-in-page opens themNo equivalent10
ProgressLabel and ProgressValue partsNot in shadcn's Radix progress.tsx8
delay on the hover card trigger and on TooltipProvideropenDelay/closeDelay on the hover card root, delayDuration on the provider2

That is also why the app screens fail: their menus and links use render on DropdownMenuTrigger and Button, their filters use Select with items and ToggleGroup without type, and some progress bars use the Base UI label and value parts. Marketing blocks mostly use Button, Badge, Card, Input and Label in ways that are the same on both.

Styling is the other half. Base UI marks state with attributes like data-open and data-checked; Radix uses data-state="open". If your global CSS imports shadcn's own shadcn/tailwind.css, as our test project does, it defines the data-open:, data-closed:, data-checked:, data-unchecked:, data-selected:, data-disabled: and data-active: variants to match both, so classes like these work either way. It does not map data-popup-open, data-starting-style, data-ending-style, data-pressed or data-indeterminate. Outside the failing files, only the nine mega menus and avatar-10 (an open-state style on its trigger) use them.

The mega menus are a special case. They import Base UI's navigation menu directly, so on a Radix project they still install and add @base-ui/react as a dependency. They typecheck, but you end up with both libraries installed.

If your project is on Radix#

  • Most marketing blocks: install as usual. The shadcn CLI adds the primitives a block needs in your project's own style. If you already have button.tsx or tabs.tsx, it asks before overwriting; answer no to keep yours.
  • The listed FAQ blocks, forms-27 and the six components: fix them using the table above. For the FAQ blocks that means type="multiple" (or type="single" collapsible with a string defaultValue) on the accordion and removing hiddenUntilFound.
  • App screens: use them in a Base UI project. Converting one means rewriting every render to asChild, every Select with items and every ToggleGroup, in the screen and in the shared shell. That is real work, and we haven't tested the result.

You can run both libraries side by side: shadcn components are files in your project, and nothing stops a Radix project from installing @base-ui/react for a few components. The cost is two sets of primitives in your bundle and two APIs to remember.

Should you switch to Base UI?#

Not for our blocks alone. Radix still works, -b radix still sets up a Radix project, and most marketing blocks compile on it unchanged. Base UI is the better fit if you're starting a new project anyway (it's what init gives you now), if you want the app screens, or if you'd like accordion answers that find-in-page can reach. If you have a large Radix codebase, the table above is roughly the list of changes, and the component pages in the shadcn docs have a Radix and a Base UI version (/docs/components/radix/… and /base/…).

Installing from our registry#

Free items install from the free library's public URL, without an account. Each item's page shows its line, for example:

npx shadcn@latest add https://www.themes.dev/ui/r/hero.json

UI Pro items install from the @themesdev registry after a one-time setup (an API key in .env.local and a registry entry in components.json, see how to install UI Pro blocks):

npx shadcn@latest add @themesdev/hero-03

In both cases the registry lists the shadcn primitives by name, not as files of ours, so they come from shadcn's registry in your project's style, Base UI or Radix. Our numbers are from 28 November 2026; we'll rerun the test when shadcn changes either style.

Built on Tailwind CSS v4

1401 finished blocks on shadcn/ui, React and Astro

UI Pro, from €199

Build it with

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans

UI Pro

Build your next site from finished blocks

Every block, page template and website theme from €199, paid once, with every update and everything we add later. Not ready? The free blocks are open to everyone.

blocks
1401
page templates
55
website themes
29
The Case study page template from UI Pro, built from its blocks.

This page is built from UI Pro blocks: Zandloper (article-14), Rooilijn (call-to-action-07).