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

You're viewing older docs for version 7.0. View latest docs


Parent: main.js|ts configuration

Type: (body: string) => string

Programmatically adjust the preview <body> of your Storybook. Most often used by addon authors.

💡 If you don't need to programmatically adjust the preview body, you can add scripts and styles to preview-body.html instead.

For example, you can conditionally add scripts or styles, depending on the environment:

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,304 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software

Maintained by
Special thanks to Netlify and CircleCI