Build your own StorybookGPTVisual test with Chromatic
Back to integrations
Add your integration
  • ⭐️ Popular
  • 🧩 Essentials
  • 🛠 Code
  • ⚡️ Data & state
  • ✅ Test
  • 💅 Style
  • 🎨 Design
  • ⚙️ Appearance
  • 🗄 Organize
How to install addons Create an addon
Use Chakra UI in your Storybook stories.
npm install @snek-at/storybook-addon-chakra-ui
Last updated over 1 year ago
Downloads per week
Readme View on GitHub


Use Chakra UI in your Storybook stories.

Wraps each of your stories with ChakraProvider which can be configured using Storybook parameters.




yarn add -D @snek-at/storybook-addon-chakra-ui


npm i -D @snek-at/storybook-addon-chakra-ui

Add the addon to your configuration in .storybook/main.js:

module.exports = {
  addons: ['@snek-at/storybook-addon-chakra-ui']

Configuring ChakraProvider

If you need to customize the props passed to ChakraProvider for your stories (to use a custom theme, for example), you'll need to create custom Storybook parameters.

To set global parameters for this addon, add a chakra object to the parameters export in .storybook/preview.js:

import myTheme from '../theme'
export const parameters = {chakra: {theme: myTheme}}

The chakra parameters take the same shape as the props for ChakraProvider. See the ChakraProvider props table to see the list of possible parameters.

Overriding ChakraProvider configuration for individual components or stories

Storybook allows you to define parameters at multiple levels: global, component, and story. We recommend setting default parameters at the global level, and overriding them at the component or story when necessary. See the Storybook Parameters documentation for more information.

Join the community
6,379 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software

Maintained by
Special thanks to Netlify and CircleCI