migrate-radix-to-base

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

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/coleYab/usacr --skill migrate-radix-to-base-coleyab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migrate-radix-to-base
Source: https://github.com/coleYab/usacr/tree/main/.agents/skills/migrate-radix-to-base
Command: npx skills add https://github.com/coleYab/usacr --skill migrate-radix-to-base-coleyab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Switching a React project from Radix UI to Base UI requires rewriting primitives, props, data attributes, and CSS variables across wrappers and every consumer call site, which is error-prone when done by hand. This Skill performs the migration systematically while keeping the project buildable at every step. ## Core Features & Use Cases - Golden-pair migration via the shadcn CLI: Fetches official base-style registry variants and replays user customizations with three-way merges, preserving project styling. - Transformation engine with verified prop tables: Hand-migrates non-shadcn or legacy-style code using per-family reference tables (overlays, menus, form controls, disclosure, display) verified against @base-ui/react type definitions. - Progressive and whole-project modes: Migrates a single component strangler-fig style or the entire project in dependency order, with per-component reports in a .migration/ directory. - Use Case: Ask to "migrate the dialog and dropdown-menu components to Base UI" and receive migrated wrappers, updated consumer call sites, typecheck results, and a report listing behavior deltas like menu close-on-click changes. ## Quick Start Migrate the accordion component in this project from Radix UI to Base UI and report what changed.

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 CLI info command to detect the current style, then fetch the matching base-style registry variant per component and replay your customizations onto it. Migrate one component at a time, typecheck after each, and flip components.json to the base style only after the last Radix wrapper is gone.

How do I convert a single component like accordion from Radix to Base UI?▼

Write the migrated version to a new accordion-base.tsx file, leaving the original untouched, then repoint consumers one at a time with typechecks between each. Once no consumer imports the original, delete it, rename the base file, and commit.

What replaces asChild when migrating Radix UI to Base UI?▼

Base UI replaces asChild with the render prop, which accepts a React element or a function receiving props and state. For example, <Trigger asChild><Button/></Trigger> becomes <Trigger render={<Button/>}>, with nativeButton set to false for non-button elements.

Does Base UI support all Radix UI primitives?▼

No. AspectRatio maps to a CSS aspect-ratio div, Label to a native label element, and VisuallyHidden to the sr-only class. Popover Anchor and NavigationMenu Indicator have no equivalent and are passed through inertly with a flag in the migration report.

Why does my tabs component behave differently after migrating to Base UI?▼

Base UI Tabs default to manual activation while Radix defaults to automatic, so keyboard focus no longer switches tabs automatically. The migration flags this as a behavior delta; opt into the old feel with Tabs.List activateOnFocus if desired.

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 Radix packages and remove the Radix dependencies only after the final component is migrated.