Skip to content

Conversation

@Adebesin-Cell
Copy link
Contributor

@Adebesin-Cell Adebesin-Cell commented Dec 13, 2025

📝 Description

Adds the new @chakra-ui/codemod package to help automate migration of Chakra UI projects from v2 to v3 following the official migration guide.

This package provides codemods for updating component props, restructuring components, and refactoring theme configurations according to v3 changes. It covers all migration steps outlined in the guide, helping developers upgrade with minimal manual effort.

⛳️ Current behavior

Developers must manually update:

  • Renamed props (e.g., isActivedata-active, colorSchemecolorPalette)
  • Component structures (e.g., CollapseCollapsible, ModalDialog)
  • Theme configuration and system setup
  • Any other breaking changes introduced in Chakra UI v3

This process is error-prone and time-consuming.

🚀 New behavior

The codemods automate the migration:

  • Renames and updates component props across the codebase
  • Refactors components to their v3 structures (e.g., compound components, renamed components)
  • Updates theme configuration to use createSystem and defaultConfig
  • Handles all other structural and behavioral changes as outlined in the official migration guide
  • Supports dry-run mode to preview changes before applying them

💣 Is this a breaking change?

No, the codemod is a migration helper. It does not change runtime behavior by itself but updates the codebase to match v3 conventions.

📝 Additional Information

Developers should review all changes after running codemods and complete any remaining manual migration steps according to the migration guide.

This package is intended to speed up the upgrade process and reduce manual effort.

@changeset-bot
Copy link

changeset-bot bot commented Dec 13, 2025

🦋 Changeset detected

Latest commit: 6df5d37

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@chakra-ui/panda-preset Minor
@chakra-ui/codemod Minor
@chakra-ui/charts Minor
@chakra-ui/cli Minor
@chakra-ui/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 13, 2025

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

Project Deployment Review Updated (UTC)
chakra-ui-storybook Ready Ready Preview Dec 19, 2025 7:54pm
chakra-v3-docs Ready Ready Preview Dec 19, 2025 7:54pm

@Adebesin-Cell Adebesin-Cell changed the title feat: Codemod for Chakra UI v2 → v3 Migration feat: Codemod for Chakra UI Dec 13, 2025
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