No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

Configure your project

Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.

A wall of logos representing different styling technologies

Add styling and CSS

Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.

Learn more
An abstraction representing the composition of data for a component

Provide context and mocking

Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.

Learn more
A representation of typography and image assets

Load assets and resources

To link static files (like fonts) to your projects and stories, use the staticDirs configuration option to specify folders to load when starting Storybook.

Learn more

Do more with Storybook

Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.

A screenshot showing the autodocs tag being set, pointing a docs page being generated

Autodocs

Auto-generate living, interactive reference documentation from your components and stories.

Learn more
A browser window showing a Storybook being published to a chromatic.com URL

Publish to Chromatic

Publish your Storybook to review and collaborate with your entire team.

Learn more
Windows showing the Storybook plugin in Figma

Figma Plugin

Embed your stories into Figma to cross-reference the design and live implementation in one place.

Learn more
Screenshot of tests passing and failing

Testing

Use stories to test a component in all its variations, no matter how complex.

Learn more
Screenshot of accessibility tests passing and failing

Accessibility

Automatically test your components for a11y issues as you develop.

Learn more
Screenshot of Storybook in light and dark mode

Theming

Theme Storybook's UI to personalize it to your project.

Learn more

Addons

Integrate your tools with Storybook to connect workflows.

Discover all addons
Integrate your tools with Storybook to connect workflows.
Github logo

Join our contributors building the future of UI development.

Star on GitHub
Discord logo

Get support and chat with frontend developers.

Join Discord server
Youtube logo

Watch tutorials, feature previews and interviews.

Watch on YouTube
A book

Follow guided walkthroughs on for key workflows.

Discover tutorials