← All open source projects

Storybook

storybookjs/storybook

Storybook is a frontend workshop for developing, documenting, and testing UI components and pages in isolation from the main application.

Forks 10,116
Author storybookjs
Language TypeScript
License MIT
Synced 2026-06-09

What it is

Storybook is an environment for developing UI components in isolation. Instead of finding the right state inside a large app, a developer opens a story: a button, form, card, modal, or page with predefined props.

The project became a standard tool for design systems and component libraries because it connects development, documentation, and testing. A component can be shown to designers, QA, and other teams without starting the whole product.

What is inside and how people use it

Inside are core packages, renderers for React, Vue, Angular, Svelte, and other stacks, addons, documentation, tests, and examples. Storybook is extended through addons for accessibility, actions, controls, docs, and testing.

Component story

This example shows how a component gets a visible state in Storybook without running the whole application.

Language: React TSX
import type { Meta, StoryObj } from '@storybook/react'
import { Button } from './Button'

const meta = { component: Button } satisfies Meta<typeof Button>
export default meta

export const Primary = {
  args: { children: 'Save changes', variant: 'primary' },
}

A typical use case is writing stories for every important state: normal, empty, loading, error, disabled, and long text. Then UI becomes a visible catalog.

Strengths and limitations

The strength is isolation and a shared place for interface discussion. Storybook helps the team see which components exist, what they look like, and which states they support.

The limitation is maintenance. If stories are not updated with the product, they turn into a museum of old UI.