Storybook Docs

previewHead

Parent: main.js|ts configuration

Type: (head: string) => string

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

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

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

Code Snippets
Oh no! We could not find the code you are looking for.
It would be great if you could report an issue on Github if you see that message.
Join the community

6,378 developers and counting
Open source software
Maintained by
Chromatic
Special thanks to Netlify and CircleCi