New
Automatic visual tests in Storybook, plus 2.2x faster build times for React+TSVisual test with Chromatic
Star80,494

framework

(Required)

Parent: main.js|ts configuration

Type: FrameworkName | { name: FrameworkName; options?: FrameworkOptions }

Configures Storybook based on a set of framework-specific settings.

name

Type: string

For available frameworks and their options, see their respective documentation.

options

Type: Record<string, any>

While many options are specific to a framework, there are some options that are shared across some frameworks, e.g. those that configure Storybook's builder.

options.builder

Type: Record<string, any>

Configures Storybook's builder, Vite or Webpack.

options.builder.useSWC

(⚠️ Experimental)

For frameworks made with the Webpack builder, this option allows you to use the SWC compiler instead of Babel.

When Storybook loads, it will update Webpack's configuration including the required loaders (e.g., TerserPlugin, babel-loader) with SWC equivalents (e.g., swc-loader) for bundling and minification.

Was this page helpful?

Markdown accepted ([link text](url), _italic_, **bold**, etc). Your anonymous feedback will be posted publicly on GitHub.

✍️ Edit on GitHub – PRs welcome!
Join the community
6,326 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI