Skill library

Agent skill Frontend

Migrate Radix To Base

Build or refine reusable components for a web interface.

  • UI components
  • Design systems
  • shadcn/ui

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add shadcn-ui/ui --skill migrate-radix-to-base --agent claude-code --yes

Check this file in your project.claude/skills/migrate-radix-to-base/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add shadcn-ui/ui --skill migrate-radix-to-base

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use a clean migration branch in an existing Radix-backed shadcn project. The fixture used shadcn CLI 4.23.1, Radix UI 1.8.1 and Base UI 1.9.0 together. Check the actual project style and package manager first.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
migrate-radix-to-base
Scenario
Migrate one Accordion progressively
Deliverable
A verified Base UI wrapper beside the legacy wrapper, plus a per-component report with the remaining Radix wrapper count.
Skill name
migrate-radix-to-base
Repository
shadcn-ui/ui

Define a component task with an observable result

A request with an unclear outcome

Overwrite the Accordion and change the global base in one operation.

Existing customizations and Radix-specific consumer props can be lost before they have been migrated.

A workflow with observable results

  1. Identify the exact stock Accordion
  2. Port one consumer beside the original
  3. Check both consumer paths

Migrate Radix to Base UI operation manual

Use the paired shadcn registry wrappers to migrate one consumer while the legacy wrapper still serves the rest of the project.

Replace the bracketed details with your own project and target.

  1. Identify the exact stock Accordion

    Collect a build baseline and compare the wrapper to its registry origin.

    Prompt · Step 1
    Use `migrate-radix-to-base` on [Accordion wrapper]. Run the project shadcn runner with `info --json`. Record the style, UI alias, package manager, current imports and baseline typecheck or build. If that exact style has a Base sibling, compare both public registry files and mark all local edits. For a legacy style lacking a Base sibling, use the bundled transformation tables on the actual wrapper.
  2. Port one consumer beside the original

    Keep both primitive packages during the migration.

    Prompt · Step 2
    Use `migrate-radix-to-base` for [one Accordion consumer]. Create a sibling `accordion-base.tsx`, preserving custom classes. Reuse an installed `@base-ui/react` or add it with the project lockfile manager after approval. Convert Content to Panel and map controlled single-selection values to arrays. Keep the project style and old wrapper in place. Look for remaining Radix imports and unresolved `IconPlaceholder` in the new file, then typecheck.
  3. Check both consumer paths

    Report what runs and what still imports Radix.

    • The new wrapper retains project classes and its consumer uses the Base UI value shape.
    • Legacy consumers still run and the report identifies remaining Radix wrappers.
    Prompt · Step 3
    Use `migrate-radix-to-base` to verify [original and migrated local consumers]. Use Enter and Space to expand and collapse both, and check aria-expanded and panel visibility. Compare build results with the baseline. Use the bundled report structure for `.migration/accordion.md` and include the derived count of wrappers still on Radix.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

Map a controlled single AccordionReference
Command or reference
consumer-props.md · Accordion
Examples
Check array values in Base UI even with one open item.

Migrate Radix to Base UI troubleshooting

Can I preview a stock Base UI wrapper?

In CLI 4.23.1, `shadcn add https://ui.shadcn.com/r/styles/base-nova/accordion.json --dry-run` lists prospective files and dependencies. Use the registry URL that matches your project style. In a progressive migration, create the sibling file after comparing the stock code with local customizations.