chakra-ui-migrate

Migrates Chakra UI projects from v2 to v3 with codemods and manual rewrites.

Updated May 18, 2026
One-click install
npx skills add https://github.com/FredoAi/fredo --skill chakra-ui-migrate-fredoai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: chakra-ui-migrate
Source: https://github.com/FredoAi/fredo/tree/main/.opencode/skills/chakra-ui-migrate
Command: npx skills add https://github.com/FredoAi/fredo --skill chakra-ui-migrate-fredoai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading Chakra UI from v2 to v3 involves breaking changes across packages, providers, color mode handling, prop names, and component APIs, and missing any of them leaves a codebase full of type errors and visual regressions. ## Core Features & Use Cases - Guided migration workflow: Walks through package updates, the official codemod, provider setup, color mode migration, prop renames, compound component rewrites, theming recipes, and Next.js specifics in order. - Reference tables and code pairs: Provides v2-to-v3 mappings for props (colorScheme to colorPalette, isDisabled to disabled), components (Modal to Dialog, FormControl to Field), and theming (extendTheme to createSystem, styleConfig to recipes). - Use Case: After upgrading @chakra-ui/react and seeing hundreds of TypeScript errors from isOpen, Modal, and useColorModeValue usages, follow the steps to run the codemod, rewrite compound components, and validate with tsc, lint, and build. ## Quick Start Ask the assistant to migrate your project from Chakra UI v2 to v3 and have it inspect your package.json before applying the codemod and manual fixes.

Frequently Asked Questions about chakra-ui-migrate

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

FAQPage Schema
How do I migrate Chakra UI from v2 to v3?▼

Remove v2-only packages like @chakra-ui/icons and framer-motion, install @chakra-ui/react v3 with @emotion/react, then run npx @chakra-ui/codemod upgrade. Afterward manually update the provider, color mode, prop names, and compound components, and validate with tsc, lint, and build.

What replaced colorScheme and isDisabled in Chakra UI v3?▼

colorScheme was renamed to colorPalette and isDisabled to disabled in v3. Other boolean props follow the same pattern: isOpen becomes open, isInvalid becomes invalid, and isChecked becomes checked.

Does Chakra UI v3 work with Next.js App Router?▼

Yes. Place the generated Provider in app/layout.tsx as a Server Component, since the provider file itself includes the use client directive. Add suppressHydrationWarning to the html tag to prevent color mode flicker.

Why is useColorModeValue not working after upgrading Chakra UI?▼

useColorModeValue, useColorMode, and ColorModeScript were removed in v3. Color mode is now handled by next-themes through the generated Provider, and you should use semantic tokens like fg.default and bg.subtle that adapt automatically.

What replaces Modal and FormControl in Chakra UI v3?▼

Modal becomes the Dialog compound component with Dialog.Root, Dialog.Content, Dialog.Header, and related parts. FormControl becomes Field.Root with Field.Label, Field.ErrorText, and Field.HelpText replacing FormLabel, FormErrorMessage, and FormHelperText.

What are the limitations of the Chakra UI v3 codemod?▼

The codemod handles mechanical changes like component renames, prop updates, and import rewrites, but it does not replace manual review. Complex compound component usage, custom themes, and color mode logic still require manual migration and a validation pass.