heroui-migration
Fungsinya
Skill ini memandu perpindahan aplikasi web dari HeroUI versi 2 ke versi 3. Skill menjelaskan perubahan utama, seperti provider yang dihapus dan struktur komponen yang baru.
Kapan dipakai
- ✓Saat Anda ingin meningkatkan aplikasi yang memakai HeroUI versi 2 ke versi 3.
- ✓Ketika Anda perlu memperbarui komponen yang strukturnya berubah di versi 3.
- ✓Saat Anda ingin menemukan panduan migrasi resmi HeroUI.
Link skill
https://github.com/heroui-inc/heroui/blob/v3/skills/heroui-migration/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bantu saya meningkatkan aplikasi saya dari HeroUI v2 ke v3, mulai dari komponen yang paling banyak berubah.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent membaca dokumentasi migrasi resmi sebelum mengubah apa pun, karena banyak pola versi 2 tidak lagi berfungsi. Setelah itu agent menerapkan pembaruan komponen demi komponen.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
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.
Pertanyaan umum
Apakah saya masih memerlukan provider HeroUI?
Tidak. Versi 3 tidak memerlukan komponen provider.
Apa yang berubah pada struktur komponen?
Komponen kini memakai bagian gabungan, misalnya kartu dengan bagian header, alih-alih prop judul yang datar.
Apakah perubahan gaya juga dicakup?
Ya. Skill mencatat bahwa versi 3 memakai Tailwind versi 4 dan prop className sebagai pengganti classNames.
Detail
Deskripsi asli dari pembuat
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.
repo: heroui-inc/heroui
Popularitas
- Bintang GitHub
- 31k
- Peringkat
- #9325
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
heroui-native
31kMembantu agent Anda membangun layar aplikasi mobile dengan komponen HeroUI Native, seperti tombol, kartu, dan dialog.
heroui-react
31kMembantu agent Anda membangun antarmuka web React dengan komponen HeroUI v3, seperti tombol, modal, formulir, dan kartu.
Skill serupa
angular-developer
280kMembantu agent Anda membuat kode Angular dan memberi saran struktur proyek. Berguna saat memulai proyek baru, membuat komponen, atau meningkatkan performa.
frontend-a11y
280kMembantu agent Anda membuat antarmuka web dapat diakses semua orang. Memastikan website dan aplikasi berfungsi baik dengan screen reader dan navigasi keyboard.
frontend-patterns
280kMembuat agent Anda menerapkan pola modern dalam frontend. Mengoptimalkan performa, mengelola state, dan mengikuti praktik terbaik React dan Next.js.