Skip to content

feat: migrate from HeroUI v2 to v3#17

Merged
wingkwong merged 2 commits intomainfrom
migrate/heroui-v3
Mar 21, 2026
Merged

feat: migrate from HeroUI v2 to v3#17
wingkwong merged 2 commits intomainfrom
migrate/heroui-v3

Conversation

@wingkwong
Copy link
Member

@wingkwong wingkwong commented Mar 20, 2026

Summary

  • Migrate from HeroUI v2 to v3, adopting the new CSS-first architecture, compound components, and BEM class system
  • Upgrade React 18 to 19, remove framer-motion, @react-aria/visually-hidden, @heroui/use-theme, @heroui/system, and all 40+ individual @heroui/* v2 packages in favor of @heroui/react + @heroui/styles
  • Rewrite removed components: Navbar (native HTML + Tailwind + react-router-dom), Snippet/Code (native HTML), theme switch (useSwitch hook replaced with plain button)

Changes by file

File Change
package.json Replace 40+ v2 deps with @heroui/react + @heroui/styles RC, upgrade React to v19
src/styles/globals.css Replace @plugin/@source with @import "@heroui/styles"
src/hero.ts Deleted (v3 has no Tailwind plugin)
src/provider.tsx Remove HeroUIProvider (not needed in v3)
src/layouts/default.tsx Replace Link with plain <a>, color tokens updated (text-default-600text-muted, text-primarytext-accent)
src/pages/index.tsx Use BEM classes (button--primary, button--tertiary) on <a> tags, replace Snippet/Code with native HTML
src/components/navbar.tsx Full rewrite with native HTML + react-router-dom Link, v3 BEM classes for Kbd and search
src/components/theme-switch.tsx Replace useSwitch hook with simple <button> using localStorage
src/components/primitives.ts Update text-default-600 → `text-m

@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vite-template Ready Ready Preview, Comment Mar 21, 2026 4:33pm

Request Review

@wingkwong
Copy link
Member Author

heroui-cli reads main branch for init command. Convert this PR to draft and reopen once cli supports v3.

@wingkwong wingkwong marked this pull request as ready for review March 21, 2026 16:32
@wingkwong wingkwong merged commit 9b123e1 into main Mar 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant