Skip to Content

Upgrading from v0.x to v1.x

A simple guide to upgrade your existing Chakra UI projects to v1.0.

Chakra UI v1.0 is focused on improving the ideas and concepts from 0.x to make even easier to create, theme and extend components.

While there's quite a number of new features we've added, we focused on making Chakra UI a stable base to build your own design systems on top of. In the end, we want make you feel more confident using Chakra UI in production.


Theming API: Chakra UI now provides a new theming API which makes it easy to style components and their modifiers (sizes, variants, and color scheme) from your theme.

Color mode improvement: We've fixed the bugs related to Color mode and made it possible to persist color mode, set initial color mode, and lock specific components to a certain color mode.

Better TypeScript support: This means all components have very good TypeScript support and most low-level components like Box, Flex will support the as prop and types will be extracted properly.

Theme-aware sx prop: Just like theme-ui, we've added support for the sx prop to help you add theme-aware styles directly on any Chakra component. This is useful if you're not a fan of style props, and prefer passing all styles in one object.

Deprecated PseudoBox: We've removed PseudoBox and merged all it's props with Box so you can use pseudo style props, like _hover, _active in any Chakra components.

Upgrade steps#

Here's a list of steps to take in order to migrate your project safely. Don't worry if your styles aren't exactly the same — this is to be expected.

1. Update your dependencies#

Chakra no longer requires @emotion/core, @emotion/styled and emotion-theming peer dependencies. If you're not using these libraries in your code, you can safely remove them and update Chakra UI to v1.

Please note that when using Chakra UI in a TypeScript project, a minimum TypeScript version of 3.8.0 is required.

Notes on Icons#

Chakra moved all icons to a separate package @chakra-ui/icons. We recommend using react-icons in your projects considering it has a robust set of icons. However, you can still install this package.

2. Update the ThemeProvider#

Swap out ThemeProvider with ChakraProvider to make setup cleaner. ChakraProvider adds the following providers for you automatically:

  • ThemeProvider: Provides the theming context for all components
  • ColorModeProvider: Provides color mode (light or dark) context to all components
  • GlobalStyle: Provides the global styles defined in to your application.

Optionally via prop:

  • CSSReset: To omit the recommended CSSReset, pass resetCSS={false}.
  • PortalManager: Manages portals and nested portals without using z-index in your application. Pass the portalZIndex prop.

4. Rename variantColor to colorScheme#

Fire up your "Find and Replace" tool in VSCode or IntelliJ. Find variantColor and replace with colorScheme.

Reason: We renamed this prop to make it easier to understand that this prop represents a visual color scheme, not a css color attribute.

5. Update layout size prop#

Change size prop to width or w and height, or h. If you'd like to use only one prop to manage this, you can rename it to boxSize.

We strongly recommend using the width and height props

Reason: We think the size prop should only be used for component size modifiers. The size prop has caused a lot of confusion in the past because, in some components (e.g. Button), it means the visual size and in others (e.g Box), it means width and height.

6. Replace PseudoBox elements#

PseudoBox is now deprecated and its props can now be directly applied to Box. Replace all PseudoBox components with Box.

7. Update theme breakpoints#

You may safely skip this if you didn't customize your breakpoints.

To provide easier extensibility and typesafety, breakpoints should now be created through createBreakpoints by passing an object:

Please note that unless you plan overriding all components, sm to xl are required.

You may of course add for example xxl or other breakpoints in between - createBreakpoints will sort in ascending order. It is adviseable to not mix css units.

Reason: Previously, breakpoints on a theme had to be an array with your breakpoints in ascending order which made it hard to reference which value was correlating to md etc. On top, you had to manually manipulate the array by defining properties on it, which was often overlooked and not typesafe.

8. ColorModeScript (optional)#

You may safely skip this if you do not allow to change the color mode.

To keep color mode settings in sync across page visits, you will need to add the ColorModeScript.

For exhaustive examples, please visit Features > Color Mode # Add ColorModeScript.

Component Updates#

We've updated the API of some components to fix bugs and improve usability, types and accessibility.


  • Update all imports of AccordionHeader to AccordionButton. This is to remove the notion that it's a header when it's actually a button.

WAI-ARIA guidelines require that accordion buttons be wrapped in the appropriate heading tag h2-h6 based on the page heading flow.

We think the name AccordionHeader might mislead users to think we handle this out of the box when we don't. Here's how to handle this:

  • You can no longer use AccordionItem in isolation, it must be used within Accordion.


  • Change all imports of AspectRatioBox to AspectRatio

Removed support for the addSeparator prop


  • We've unified the usage of all icon props to only accept a React element. Update all icon names used in leftIcon or rightIcon to the equivalent icon React element.

Replacement logic: If leftIcon is email, then replace it with <EmailIcon/> from Chakra.

This reduces the effort needed to use custom icons, eliminates TypeScript errors, and reduces unused icons bloating your app.

  • Renamed variantColor to colorScheme

  • Removed negative side margins on leftIcon and rightIcon elements. We believe the user should handle these side margins. #1024


  • Change variantColor to colorScheme
  • Deprecated the isFullWidth prop. Checkbox now takes up the width of the parent by default.

  • To allow for better checkbox group layout, the CheckboxGroup component no longer supports every style prop.

    You can now only pass size, variant, and colorScheme in addition to CheckboxGroup-specific props (value, defaultValue, and onChange).

We believe a checkbox group's layout should be managed by your design requirements. The checkboxes can be grouped using Stack, placed in a grid using SimpleGrid or made to wrap automatically using Wrap.


  • Color mode now persists correctly when you refresh the page. All you need to do is add ColorModeScript script as the first child of body.

    Here's how to add it for Next.js:

Here's how to add it for Gatsby:

You can also install the gatsby-plugin-chakra-ui package which automatically configures ColorModeScript along with ChakraProvider.


The onRequestEdit prop has been renamed to onEdit. This applies to both the prop passed to Editable as well as the prop in its render props.


  • Basic interface icons provided by Chakra have moved to the icons package. Replace all <Icon name="..." /> elements imported from core with equivalent named icon React elements imported from icons.

    Replacement logic: If <Icon name="search" /> is used, then replace it with <SearchIcon /> from Chakra icons package.

Existing icons will appear as a question mark until refactored.

  • We changed the way custom icons are created. Instead of adding custom icons to theme create your own icons using the createIcon utility:

As a convenience you can also import createIcon from the icons package along with other icons:

Icon Button#

  • We've unified the usage of all icon props to only accept a React element. Update all icon names used in icon to the equivalent icon React element.

Replacement logic: If icon is email, then replace it with <EmailIcon/> from Chakra.

This reduces the effort needed to use custom icons, eliminates TypeScript errors, and reduces unused icons bloating your app.

  • Renamed variantColor to colorScheme


Renamed colorStart and colorEnd props to startColor and endColor respectively.


Resolved SSR issue with Next.js. If you still run into issues, we recommend using the Img component which is a regular img tag with support for Chakra props.


  • When using InputAddon, you no longer need to pass border radius properties to the Input. InputGroup will intelligently detect the addon and apply the necessary border to the input.

Due to accessibility reasons, we've deprecated the isDisabled prop for Link.


  • To reduce the API surface area, we've deprecated the isReversed props in favor of the direction prop
  • Added support for responsive direction and spacing props
  • All popper related props that used to be passed to MenuList component, should now be passed to Menu. Reason: To support nested menus
  • The placement prop has moved from MenuList to Menu
  • Removed addAriaLabels and formatIds props in favor of passing a top-level id prop to the modal, and we'll handle the rest.

  • Removed preserveScrollBarGap prop. We preserve scroll bar gap by default to prevent any layout shift.

  • Wrap ModalContent with the ModalOverlay component.

  • Only pass size values defined in the components theme. Hard-coded values will be ignored. Update the styles in theme.components.Modal to reflect your custom values

  • You can now disable focus trap by passing trapFocus={false}

  • The SlideIn and Scale transition components have been replaced with the Fade, ScaleFade, Slide, and SlideFade components.


  • Change color prop to colorScheme.


  • trackColor prop now takes a specific theme color or a valid css color.
  • Change the thickness prop to point to an actual thickness value in px (e.g. thickness={4})


  • Change variantColor prop to colorScheme.
  • Deprecated the isFullWidth prop. The Radio takes up the width of the parent by default.

  • Deprecated the RadioButton component. Use the useRadio hook to create custom radio buttons. Learn more about creating custom radio buttons.

  • The useRadio hook is exported with state and focus management logic for use in creating tailor-made radio component for your application


  • Deprecated the isFullWidth prop. The RadioGroup takes up the width of the parent by default.

  • Deprecated the RadioButtonGroup component. Use the useRadioGroup hook to control a group of custom radio buttons. Learn more about creating custom radio buttons.

  • To allow for better Radio group layout, the RadioGroup component no longer supports every style prop. You can only pass size, variant, and colorScheme in addition to RadioGroup props (value, defaultValue, and onChange).


  • Update JSX structure: Wrap SliderFilledTrack with SliderTrack.


Rename the color prop to colorScheme


Change variantColor prop to colorScheme


  • Change variantColor to colorScheme
  • Added support for isDisabled prop on the TagCloseButton component
  • Default size was changed to md instead of lg


  • Removed react-spring dependency in favor of react-transition-group
  • Added support for duplicate toast prevention using toast.isActive method
  • Added support to programmatically close one or all toasts using toast.close or toast.closeAll methods
  • Added support to programmatically update a toast using toast.update method.
  • Added support for onCloseComplete prop, a callback function to run side effects after the toast component has closed.

CSS Reset#

  • Deprecated support for config prop, in favor of reading global styles from
  • Added global style for focus-visible in event you need to remove focus styles for non-keyboard interactions.


  • useDisclosure now accepts object instead of boolean as initial values

That's it! Welcome to Chakra UI v1.

If you still experience issues after migrating, feel free to create an issue or join our Discord chat here:

Edit this page