migrate-radix-to-base

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

1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/Lento47/arcana --skill migrate-radix-to-base-lento47
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: migrate-radix-to-base
Source: https://github.com/Lento47/arcana/tree/main/.agents/skills/migrate-radix-to-base
Command: npx skills add https://github.com/Lento47/arcana --skill migrate-radix-to-base-lento47

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 requires rewriting dozens of component wrappers, props, data attributes, and CSS variables by hand, with many subtle behavior differences that are easy to miss and break the UI silently. ## Core Features & Use Cases - Golden-pair migration via the shadcn CLI: Fetches the official base-style variant of each shadcn component and replays your customizations onto it with a three-way merge, so custom styling survives the switch. - Transformation engine with verified prop tables: Hand-rolled or non-shadcn Radix code is rewritten using per-family reference tables (overlays, menus, form controls, disclosure, display) covering prop renames, asChild-to-render conversion, and data-attribute/CSS-variable mapping. - Progressive or whole-project modes: Migrate a single component strangler-fig style (e.g. "migrate accordion") or the entire project in dependency order, keeping the build green at every step. - Use Case: You have a shadcn project on radix-lyra and want to switch to Base UI. The skill classifies each wrapper, migrates components one at a time, sweeps consumer call sites for changed props, and writes a per-component report in .migration/. ## Quick Start Ask the agent to migrate the accordion component from Radix UI to Base UI in this project.

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 a shadcn project from Radix UI to Base UI?▼

Run the migration component by component: classify each ui wrapper against its stock registry origin, fetch the base-style variant, replay your customizations with a three-way merge, then repoint consumers one at a time. Radix dependencies are removed only after the last component is migrated.

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

Use progressive mode: the migrated version is written to accordion-base.tsx while the original stays untouched, consumers are repointed one at a time with typechecks, and the original is deleted once nothing imports it. The files on disk track progress, so interrupted migrations resume automatically.

What replaces the asChild prop when moving from Radix UI to Base UI?▼

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

Does Base UI have equivalents for every Radix UI primitive?▼

No. AspectRatio maps to the CSS aspect-ratio property, Label to a native label element, VisuallyHidden to the sr-only class, and Direction to a DirectionProvider with a direction prop. Popover Anchor and NavigationMenu Indicator have no equivalent and are flagged as inert passthroughs.

Which libraries are intentionally left untouched during the migration?▼

Non-Radix libraries such as cmdk (command), vaul (drawer), sonner, input-otp, react-day-picker (calendar), and recharts (chart) are never modified. They are reported as intentionally untouched in the per-component migration reports.

What behavior changes should I expect after migrating 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.