Build UIs without the grunt work

Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. It's open source and free.

31.61m

Installs per month

2282

Contributors

Development
localhost:6006
Controls
Interactions
Name
Controls
Hand
description*
Introducing the Space Helmet X24: a sleek, durable motorcycle helmet with advanced ventilation, anti-fog visor, and stylish graphics. Experience ultimate protection and comfort for your rides.
productTitle*
Space Helmet X24
backgroundColor
outOfStock
False
True
padding
0
40
selectedColor
White
Space Grey
Yellow

Develop durable user interfaces

Storybook provides a workshop to build UIs in isolation. It helps you develop hard-to-reach states and edge cases without needing to run the whole app.

Build UI components and pages in isolation

Implement components and pages without needing to fuss with data, APIs, or business logic.

Start trial

Mock hard-to-reach edge cases as stories

Render components in key states that are tricky to reproduce in an app. Then save those states as stories to revisit during development, testing, and QA.

Supercharge your workflow with addons

Addons extend and customize your UI development workflow. There are hundreds of addons that help you build UI faster, document component libraries, and integrate with other tools.

Drop the finished UI components into your app

Once you finish developing UI components in isolation, drop them into your app. You'll have confidence that the components are hardened to support every possible edge case.

Integrate with the tools you already use

Storybook is incrementally adoptable and integrates with industry-standard tools. That means your team doesn't have to change their workflow.

400+
Integrations
35M
Downloads per week
TestingLib
Notion
TestingLib
Emotion
TestingLib
Jest
Nextjs
Webpack
Figma
TestingLib
TestingLib
Apollo
Playwright
Axe
TestingLib
MSW
Zeplin
GraphQL
Gatsby
Launchdarkly
TestingLib
SWC
TestingLib
TestingLib
Sketch
TestingLib
Supernova
Cypress
TestingLib
TestingLib

Test UIs with less effort and no flake

Stories capture the “known good” states of UI components. They're a pragmatic, reproducible way to keep track of UI edge cases. Reuse stories to power automated tests

Document UI for your team to reuse

Storybook brings together UI, examples, and documentation in one place. That helps your team adopt existing UI patterns.

Share how the UI actually works

Stories show how UIs actually work not just a static design of how they're supposed to work. That keeps everyone aligned on what's currently in production.

Publish Storybook to get sign off from teammates

Publish Storybook as a website for stakeholders to reference. Your team can check that the UI looks right without touching code.

Storybook Mock UI
Player
Player
Player
Player

Embed stories in wikis, Markdown, and Figma

Embed stories to showcase your work to teammates and the developer community. Works with the oEmbed standard.

Embed stories using iframes in your NextJS sites
+ and more

import stories into other JavaScript tooling

Embed stories to showcase your work to teammates and the developer community. Works with the oEmbed standard.

UserCard.test.js
                                                    import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { act } from 'react-dom/test-utils';
import { composeStories } from '@storybook/testing-react';
import * as stories from './UserCard.stories';

// Compile the "MissingProfileImage" story
const { MissingProfileImage } = composeStories(stories);

let container = null;
beforeEach(() => {
  container = document.createElement('div');
  document.body.appendChild(container);
});

afterEach(() => {
  unmountComponentAtNode(container);
  container.remove();
  container = null;
});

it('renders a fallback profile image', () => {
  // Render the story
  act(() => {
    render(<MissingProfileImage />, container);
  });

  // Verify the DOM structure
  expect(container.querySelector('img').getAttribute('src'))
    .toEqual(
      '/images/user-fallback.png'
    );
});




+ and more

Automate UI workflows

Add Storybook as a CI step to automate the UI development workflow. That helps you and your team ship faster with less manual work.

Publish Storybook
Publish Storybook online to collaborate on UI implementation with developers, designers, and PMs. Your teammates can see work without needing to spin up a dev environment.
UI Tests
Test every facet of your UI: visual, functional, accessibility, and snapshot, in CI to detect UI bugs down to the component
UI Review
Request feedback from teammates to verify UI implementation. Discuss UI changes together then assign reviewers for sign off.
Comment from a userComment from a userComment from a user
Merge and ship
Each stage of the UI development lifecycle is tracked by a pull request check. Pass all checks to get certainty that your work is ready for production.
All CI checks have passed!
Running CI checks on components
Storybook Publish - Ready to share!
Storybook Publish - Publishing UI…
UI Tests - 2 changes accepted as baselines
UI Tests - Running tests…
UI Review - 3 discussions resolved
UI Review - Awaiting reviewers…

Got Questions?
Find Answers Below!

Our Most Frequently Asked Questions

What is Storybook and what is it used for?
  • Storybook is a frontend workshop for building UI components and pages in isolation. It allows developers to build UI components without needing to run the whole app, making it easier to develop hard-to-reach states and edge cases. Thousands of teams use it for UI development, testing, and documentation. It's open source and free.
How does Storybook help with UI testing?
  • Storybook makes UI testing more efficient by capturing 'known good' states of components as stories. These stories can be used for multiple testing approaches: spot testing for debugging, visual testing to detect pixel-level changes, component testing to verify behavior, accessibility testing for WCAG compliance, snapshot testing to detect markup regressions, and can be reused across your test suite.
How does Storybook help with documentation?
  • Storybook serves as a single source of truth for UI by bringing together components, examples, and documentation in one place. It automatically generates UI docs, supports Markdown for custom documentation, allows for component reuse across pages and apps, and tracks component history and versions for quality assurance.
Can Storybook integrate with other tools and workflows?
  • Yes, Storybook is incrementally adoptable and integrates with industry-standard tools, meaning teams don't have to change their existing workflows. It can be added as a CI step to automate UI development, supports publishing for collaboration, enables UI testing in CI environments, facilitates UI review processes, and tracks development lifecycle through pull request checks.
How can teams share and collaborate using Storybook?
  • Teams can share UI implementation by publishing Storybook as a website for stakeholders to reference without touching code. Stories can be embedded in wikis, Markdown documents, and Figma for showcasing work. Since stories are based on ES6 modules, they can be imported into any JavaScript library, making them a portable standard for UI components.