radix-to-base-ui-migration

Migrates Vendure Dashboard extensions from Radix UI patterns to Base UI components.

8.4k|1.5k|Updated Jun 11, 2018
One-click install
npx skills add https://github.com/vendurehq/vendure --skill radix-to-base-ui-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: radix-to-base-ui-migration
Source: https://github.com/vendurehq/vendure/tree/main/skills/radix-to-base-ui-migration
Command: npx skills add https://github.com/vendurehq/vendure --skill radix-to-base-ui-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Vendure Dashboard extensions built on Radix UI and shadcn-style form components break when the dashboard moves to Base UI, requiring developers to manually rewrite asChild props, form wrappers, and imports across many files.

Core Features & Use Cases

  • asChild to render prop conversion: Transforms Radix's asChild composition pattern into Base UI's render prop pattern for buttons, dialog triggers, popovers, and tooltips.
  • Form component migration: Replaces FormField, FormItem, FormControl, FormLabel, and FormMessage with FormFieldWrapper or Controller plus Field primitives.
  • Import consolidation: Rewrites direct @radix-ui/, @vendure-io/ui/, and @base-ui/react/* imports to unified @vendure/dashboard imports, with rules for approved third-party exceptions.
  • Component API updates: Handles Select items props, Accordion default behavior, DropdownMenuItem onClick, and Checkbox null coercion.
  • Use Case: A developer upgrading a Vendure plugin's custom dashboard pages can point this Skill at their extension files and get all Radix-era patterns rewritten to the current Base UI API with verified imports.

Quick Start

Migrate my Vendure dashboard extension files in the plugins directory from Radix UI to Base UI patterns.

Frequently Asked Questions about radix-to-base-ui-migration

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

FAQPage Schema
How do I migrate Radix UI asChild to Base UI?

Replace the asChild prop with a render prop on the parent component. Move the child element's tag and props into render={<Child ... />}, and move the child's children up to become the parent's direct children.

How to replace FormField and FormItem in Vendure dashboard extensions?

Use FormFieldWrapper from @vendure/dashboard, which handles label, description, and error display via props. For complex fields, use Controller with Field, FieldLabel, and FieldError primitives instead.

Can I still import directly from @radix-ui or @base-ui/react packages?

No, all UI component imports must come from @vendure/dashboard. Direct imports from @radix-ui/*, @vendure-io/ui/*, and @base-ui/react/* are not allowed and should be rewritten to named dashboard imports.

Which third-party imports are allowed outside @vendure/dashboard?

React hooks, @lingui/react/macro (Trans and useLingui macros), and lucide-react icon components must be imported directly. react-hook-form, TanStack Query and Router, sonner, and non-macro Lingui APIs are re-exported from @vendure/dashboard.

Why does my Select trigger not show the selected label after migration?

The Base UI Select requires an explicit items prop mapping values to labels for trigger rendering. Without it, only the raw value displays instead of the option label.