Build faster with Premium Chakra UI Components 💎
Learn moreFebruary 22, 2025
When you run npx @chakra-ui/cli eject, the CLI copies the entire Chakra theme
into your project so you can customize it directly. This gives you full control,
but it also means you're on your own when it comes to keeping up with upstream
changes.
You can safely upgrade @chakra-ui/react to the latest version — the package
will work fine. But your ejected theme stays frozen at the version you copied it
from.
Here's what that means in practice:
The runtime upgrades, but your theme data stays behind.
If you just want to move fast and fix what's broken:
pnpm add @chakra-ui/react@latestIf you want to stay close to upstream for long-term maintenance:
pnpm add @chakra-ui/react@latestIf your theme has drifted far from upstream, or you'd rather stop syncing manually, this is the way to go.
Instead of maintaining a full copy of the theme, use createSystem() with the
default config as a base and only override what you need:
import { createSystem, defaultConfig } from "@chakra-ui/react"
const system = createSystem(defaultConfig, {
theme: {
tokens: {
// your token overrides only
},
semanticTokens: {
// your semantic token overrides only
},
recipes: {
// your recipe overrides only
},
},
})You inherit upstream changes automatically and only maintain your deltas. This is the most maintainable approach and eliminates manual syncing entirely.
| Question | Answer |
|---|---|
| Can I upgrade the package alone? | Yes. Your frozen theme just won't have new additions. |
| Do I need to manually sync? | Yes, for new tokens/recipes/styles. Runtime fixes are automatic. |
| What's the best long-term option? | Use createSystem() with overrides instead of a full theme fork. |