heroui-migration
heroui-inc/heroui
Migrate HeroUI v2 apps to v3 with compound components, no Provider, and Tailwind v4.
What is heroui-migration?
This skill guides agents through migrating HeroUI v2 applications to v3, which introduces breaking changes including compound component syntax, removal of the Provider requirement, and event handler renaming. Use it when upgrading HeroUI dependencies, refactoring component code, or accessing step-by-step migration documentation.
- Provides v2-to-v3 migration mapping for components, props, hooks, and styling
- Offers full or incremental migration strategies for different project needs
- Fetches component-specific migration guides via scripts or MCP server
- Explains compound component syntax and onPress event handler changes
- Guides styling migration from v2 classNames to v3 className with Tailwind v4
- Supports coexistence setup for gradual, incremental migrations
How to install heroui-migration
npx skills add https://github.com/heroui-inc/heroui --skill heroui-migration- HeroUI v2 project already in place
- Node.js environment to run migration scripts
- Access to migration documentation via scripts or MCP server
How to use heroui-migration
- 1.Create a migration branch in your project
- 2.Run `node scripts/get_migration_guide.mjs full` or `incremental` to fetch the main migration workflow
- 3.Analyze your project's HeroUI imports and component usage
- 4.Fetch component-specific guides: `node scripts/get_component_migration_guides.mjs button card modal`
- 5.Migrate components in batches, converting flat props to compound syntax and onClick to onPress
- 6.Switch dependencies to v3 in package.json
- 7.Run `node scripts/get_styling_migration_guide.mjs` and apply styling updates
- 8.Test and merge migration branch
Use cases
- Upgrading a v2 HeroUI app to v3 while keeping it functional during migration
- Migrating a single component batch from v2 to v3 syntax and props
- Converting flat component props to compound component structure (e.g., Card.Header)
- Removing HeroUIProvider and updating event handlers (onClick → onPress)
- Switching styling from classNames prop to className with Tailwind v4
- Frontend developers upgrading HeroUI projects
- Teams managing large codebases requiring incremental migration
- Agents assisting with component refactoring and dependency updates
heroui-migration FAQ
Use full migration if your team can dedicate focused time and tolerate temporary broken code. Use incremental migration for large codebases that must stay functional—it sets up v2/v3 coexistence and migrates components one-by-one.
No. HeroUIProvider is not needed in v3. Remove it from your root component during migration.
All interactive components changed from onClick to onPress in v3. Update all event handlers accordingly.
v3 uses compound syntax like `<Card><Card.Header>...</Card.Header></Card>` instead of flat props like `<Card title="x">`. Fetch component-specific guides for exact syntax.
Yes. Use the MCP server at https://migration-mcp.heroui.com for tool-based access, or fetch direct URLs like `.../agent-guide-full.mdx` once docs are merged to production.
Full instructions (SKILL.md)
Source of truth, from heroui-inc/heroui.
name: heroui-migration description: "HeroUI v2 to v3 migration guide for agents. Use when migrating HeroUI v2 apps to v3, upgrading components, or accessing migration documentation. Keywords: HeroUI migration, v2 to v3, migration guide, upgrade HeroUI." metadata: author: heroui version: "2.0.0" status: preview
HeroUI v2 to v3 Migration Guide
This skill helps agents migrate HeroUI v2 applications to v3. HeroUI v3 introduces breaking changes: compound components, no Provider, Tailwind v4, and removed hooks.
Installation
curl -fsSL https://heroui.com/install | bash -s heroui-migration
CRITICAL: Always Fetch Migration Docs Before Applying
Do NOT assume v2 patterns work in v3. Always fetch migration guides before implementing changes.
Key v2 → v3 Changes
| Feature | v2 (Migrate From) | v3 (Migrate To) |
|---|---|---|
| Provider | <HeroUIProvider> required | No Provider needed |
| Component API | Flat props: <Card title="x"> | Compound: <Card><Card.Header> |
| Event handlers | onClick | onPress |
| Styling | classNames prop | className prop |
| Hooks | useSwitch, useDisclosure, etc. | Compound components, useOverlayState |
| Packages | @heroui/system, @heroui/theme | @heroui/react, @heroui/styles |
Accessing Migration Documentation
For migration details, examples, and step-by-step guides, always fetch documentation:
Using Scripts
# List all available component migration guides
node scripts/list_migration_guides.mjs
# Get main migration workflow (full or incremental)
node scripts/get_migration_guide.mjs full
node scripts/get_migration_guide.mjs incremental
# Get component-specific migration guides
node scripts/get_component_migration_guides.mjs button
node scripts/get_component_migration_guides.mjs button card modal
# Get styling migration guide
node scripts/get_styling_migration_guide.mjs
# Get hooks migration guide
node scripts/get_hooks_migration_guide.mjs
Direct URLs
Migration docs (preview): use a concrete guide URL from the examples below, and never fetch a URL that still contains a placeholder.
Examples:
- Full migration:
.../agent-guide-full.mdx - Incremental:
.../agent-guide-incremental.mdx - Button:
.../button.mdx - Styling:
.../styling.mdx - Hooks:
.../hooks.mdx
Override base URL with HEROUI_MIGRATION_DOCS_BASE when docs are merged to production.
MCP Alternative
When using Cursor or other MCP clients, configure the Migration MCP server for tool-based access:
{
"mcpServers": {
"heroui-migration": {
"url": "https://migration-mcp.heroui.com"
}
}
}
Migration Strategies
Full Migration
- Best for: Projects that can dedicate focused time; teams comfortable with temporarily broken code
- Migrate all component code first (project broken during migration)
- Switch dependencies to v3
- Complete styling migration
Incremental Migration
- Best for: Projects that must stay functional; large codebases migrating gradually
- Set up coexistence (pnpm aliases or component packages)
- Migrate components one-by-one
- Both v2 and v3 coexist during migration
Always fetch the agent guide before starting: node scripts/get_migration_guide.mjs full or incremental
Core Principles
- Fetch first: Use scripts to get migration guides before applying changes
- Compound components: v3 uses
Card.Header,Card.Title,Buttonwith children—not flat props - No Provider: Remove
HeroUIProviderwhen migrating - onPress not onClick: All interactive components use
onPress - Workflow: Analyze → Migrate components → Switch deps → Styling migration
Migration Workflow Summary
- Create migration branch
- Analyze project (HeroUI imports, component usage)
- Fetch main guide:
node scripts/get_migration_guide.mjs full - Migrate components in batches (fetch component guides per batch)
- Switch dependencies to v3
- Fetch styling guide:
node scripts/get_styling_migration_guide.mjs - Apply styling updates
Preview Mode
This skill targets the staging deployment of the docs/migration branch. Once docs are merged to main and live on heroui.com, set HEROUI_MIGRATION_DOCS_BASE=https://heroui.com/docs/react/migration or update the default in scripts.
Related skills
More from heroui-inc/heroui and the wider catalog.

heroui-native
React Native component library with Tailwind v4 (Uniwind) for accessible, customizable mobile UIs.

heroui-react
Accessible React component library built on Tailwind CSS v4 and React Aria.

deep-productivity
Master deep work productivity through the three types of work framework (Building, Maintenance, Recovery). Use when user needs to: (1) Build a sustainable deep work routine with just 1 hour/day, (2) Create vision/anti-vision for life direction, (3) Structure goals using the 10-year → 1-year → 1-month → 1-week hierarchy, (4) Apply project-based learning to bridge skill gaps, (5) Identify lever-moving tasks that actually progress goals, (6) Balance focus work with necessary recovery for creativity.

seedance2-api
End-to-end AI video generation from storyboard to final output using Seedream 4.5 and Seedance 2.0

animejs
Anime.js adapter for deterministic, seek-driven animations in HyperFrames compositions.

canopy-part-title
Animated leaf-sweep reveal for headlines with customizable typography and particle effects.