migrate-radix-to-base

Migrates React components and shadcn projects from Radix UI to Base UI.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/divinaarmuela/Content --skill migrate-radix-to-base-divinaarmuela
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-radix-to-base
Source: https://github.com/divinaarmuela/Content/tree/main/.claude/skills/migrate-radix-to-base
Command: npx skills add https://github.com/divinaarmuela/Content --skill migrate-radix-to-base-divinaarmuela

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @base-ui/react, and includes references (resource) components.

What problem does it solve? Moving a React project from Radix UI to Base UI involves hundreds of prop renames, part restructures, data-attribute changes, and behavior differences that are easy to get wrong by hand. This Skill performs the migration systematically, keeping the project buildable at every step and reporting every behavior delta honestly. ## Core Features & Use Cases - Golden-pair migration via the shadcn CLI: Fetches official base-style registry variants and replays your customizations onto them with three-way merges, preserving your styling. - Transformation engine with verified prop tables: Reference files cover overlays, menus, form controls, disclosure, and display components with exact Radix-to-Base prop, data-attribute, and CSS-variable mappings checked against @base-ui/react type definitions. - Progressive or whole-project modes: Migrate a single component strangler-fig style (original untouched until consumers are repointed) or the entire project in dependency order, with per-component reports in a .migration/ directory. - Use Case: Ask to "migrate the accordion component" and the Skill classifies your wrapper against its stock origin, produces a base-ui variant, repoints consumers one at a time with typechecks, and writes a structured report listing changes, leftovers, and behavior deltas. ## Quick Start Migrate my shadcn project's dialog and select components from Radix UI to Base UI and report any behavior changes.

Frequently Asked Questions about migrate-radix-to-base

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Radix UI to Base UI in a shadcn project?

Run the shadcn info command to detect your style, then migrate component by component: fetch the base-style registry variant, replay your customizations onto it, repoint consumers one at a time, and typecheck each step. Radix dependencies are removed only after the last component is migrated.

What replaces asChild when migrating Radix to Base UI?

Base UI replaces asChild with the render prop, which accepts a ReactElement or a function of props and state. For example, <Trigger asChild><Button/></Trigger> becomes <Trigger render={<Button/>}>. Button-rendering parts also accept nativeButton when the render target is not a native button.

Can Radix UI and Base UI coexist in the same project during migration?

Yes, both libraries coexist without conflicts, which enables progressive migration. Install @base-ui/react alongside your Radix packages, migrate components one at a time using a -base.tsx suffix, and remove Radix dependencies only after the final component is converted.

Which Radix components have no Base UI equivalent?

AspectRatio maps to the CSS aspect-ratio property, Label to a native label element, VisuallyHidden to the sr-only Tailwind class, and AccessibleIcon to aria-label plus sr-only text. Popover Anchor and NavigationMenu Indicator also lack equivalents and are flagged as inert passthroughs.

Why do Tailwind data-[state=open] classes break after migrating to Base UI?

Base UI replaces Radix's data-state enum attributes with presence attributes like data-open, data-closed, data-checked, and data-pressed. Class strings must be rewritten, and animate-in/animate-out utilities should be restated using data-starting-style and data-ending-style transitions.

What behavior changes should I expect when switching from Radix to Base UI?

Known deltas include tabs defaulting to manual activation, menu checkbox and radio items not closing on click by default, and NavigationMenu hover delay changing from 200ms to 50ms. These are flagged in the migration report rather than silently patched.