Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
Go to file
Kasper Peulen 019be355f1
Merge pull request #29807 from JamesHenry/nx-20
Build: Migrate repo to Nx 20
2024-12-04 15:48:25 +01:00
.circleci Revert "temporarily remove react native sandbox" 2024-11-27 11:32:15 +01:00
.github Revert temporary changes to sandbox generation 2024-11-04 22:19:13 +08:00
.vscode Upgrade Vitest to v2 2024-08-05 09:13:53 +02:00
.yarn use same version of yarn everywhere 2024-06-19 09:08:09 +02:00
code Merge pull request #29807 from JamesHenry/nx-20 2024-12-04 15:48:25 +01:00
CONTRIBUTING fix nested lists 2024-11-05 21:29:07 +01:00
docs Write changelog for 8.5.0-alpha.17 [skip ci] 2024-12-04 10:50:47 +00:00
node_modules cleanup 2023-11-29 14:30:43 +01:00
scripts Merge pull request #29807 from JamesHenry/nx-20 2024-12-04 15:48:25 +01:00
test-storybooks Build: Fix portable stories tests by moving from jsdom to happy-dom 2024-11-29 11:57:29 +01:00
.editorconfig cleanup 2023-01-31 13:01:16 +01:00
.git-blame-ignore-revs ignore the 2 commits that moved the imports around 2024-08-08 13:17:55 +02:00
.gitattributes explicitly disable crlf to match prettier rules 2023-09-13 10:14:25 -04:00
.gitignore chore: migrate repo to nx 19 2024-12-04 13:53:21 +04:00
.ignore Remove sandbox from .ignore 2022-08-29 11:24:05 +10:00
.mailmap Update .mailmap 2018-03-08 14:44:13 -05:00
.nvmrc use node 22 2024-08-08 09:42:50 +02:00
.spelling Remove unsupported/broken frameworks/renderers 2023-05-10 11:00:39 +02:00
.yarnrc.yml use same version of yarn everywhere 2024-06-19 09:08:09 +02:00
CHANGELOG.md Update CHANGELOG.md for v8.4.6 [skip ci] 2024-11-29 12:11:32 +00:00
CHANGELOG.prerelease.md Write changelog for 8.5.0-alpha.17 [skip ci] 2024-12-04 10:50:47 +00:00
CHANGELOG.v1-5.md Fix typos 2024-03-15 21:55:21 +01:00
CHANGELOG.v6.md Fix typos 2024-03-15 21:55:21 +01:00
CODE_OF_CONDUCT.md revert Enforcement and Enforcement Guidelines to earlier version 2022-10-29 17:15:44 +02:00
codecov.yml lint the newly linted code 2022-07-25 18:51:24 +02:00
CODEOWNERS Bring back docs codeowners 2024-07-12 15:12:11 -06:00
CONTRIBUTING.md Update CONTRIBUTING.md 2024-10-04 16:43:32 +08:00
CONTRIBUTING.old.md delete cypress usage 2022-09-30 11:21:16 +02:00
LICENSE Update Copyrights from Kadira from Storybook 2024-01-27 18:50:10 +05:30
MAINTAINERS.md Docs: Fix links and assorted fixes 2024-07-09 23:44:05 +01:00
MIGRATION.md Update initializer function recommendations 2024-11-22 16:37:52 -05:00
package.json Vite Ecosystem CI: Additionally test on a built Storybook 2024-11-07 21:03:52 +01:00
prettier.config.mjs Add prettier also to the root 2024-01-15 13:29:55 +01:00
README.md Docs: README 2024-11-14 11:48:43 +02:00
RESOLUTIONS.md Clean up RESOLUTIONS.md 2024-11-16 16:24:01 +11:00
SECURITY.md Update SECURITY.md 2023-07-26 12:27:29 +02:00
yarn.lock fix 2024-01-19 16:28:11 +01:00

Storybook

Build bulletproof UI components faster


Build Status on CircleCI codecov License
Storybook Community Backers on Open Collective Sponsors on Open Collective Official Twitter Handle OpenSSF Scorecard

Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. Find out more at https://storybook.js.org!

View README for:
latest next

Table of contents

Getting Started

Visit Storybook's website to learn more about Storybook and to get started.

Documentation

Documentation can be found on Storybook's docs site.

Examples

View Component Encyclopedia to see how leading teams use Storybook.

Use storybook.new to quickly create an example project in Stackblitz.

Storybook comes with a lot of addons for component design, documentation, testing, interactivity, and so on. Storybook's API makes it possible to configure and extend in various ways. It has even been extended to support React Native, Android, iOS, and Flutter development for mobile.

Community

For additional help, share your issue in the repo's GitHub Discussions.

Projects

Supported Frameworks

Renderer Demo
React Storybook demo React
Angular Storybook demo Angular
Vue 3 Storybook demo Vue 3
Web components Storybook demo Svelte
React Native React Native
HTML Storybook demo HTML
Ember Ember
Svelte Storybook demo Svelte
Preact Storybook demo Preact
Qwik Qwik
SolidJS SolidJS
Android, iOS, Flutter Native

Addons

Addons
a11y Test components for user accessibility in Storybook
actions Log actions as users interact with components in the Storybook UI
backgrounds Let users choose backgrounds in the Storybook UI
cssresources Dynamically add/remove CSS resources to the component iframe
design assets View images, videos, and weblinks alongside your story
docs Add high quality documentation to your components
events Interactively fire events to components that respond to EventEmitter
google-analytics Reports google analytics on stories
graphql Query a GraphQL server within Storybook stories
jest View the results of components' unit tests in Storybook
links Create links between stories
measure Visually inspect the layout and box model within the Storybook UI
outline Visually debug the CSS layout and alignment within the Storybook UI
query params Mock query params
storysource View the code of your stories within the Storybook UI
viewport Change display sizes and layouts for responsive components using Storybook

See Addon / Framework Support Table

To continue improving your experience, we have to eventually deprecate or remove certain addons in favor of new and better tools.

If you're using info/notes, we highly recommend you migrate to docs instead, and here is a guide to help you.

If you're using contexts, we highly recommend you migrate to toolbars and here is a guide to help you.

If you're using addon-storyshots, we highly recommend you migrate to the Storybook test-runner and here is a guide to help you.

Badges & Presentation materials

We have a badge! Link it to your live Storybook example.

Storybook

[![Storybook](https://cdn.jsdelivr.net/gh/storybookjs/brand@main/badge/badge-storybook.svg)](link to site)

If you're looking for material to use in your Storybook presentation, such as logos, video material, and the colors we use, you can find it all on our brand repo.

Community

Contributing

Contributions to Storybook are always welcome!

  • 📥 Pull requests and 🌟 Stars are always welcome.
  • Read our contributing guide to get started, or find us on Discord, we will take the time to guide you.

Looking for a first issue to tackle?

  • We tag issues with Good First Issue when we think they are well suited for people who are new to the codebase or OSS in general.
  • Talk to us, we'll find something that suits your skills and learning interest.

Development scripts

Storybook is organized as a monorepo. Useful scripts include:

yarn start

Runs a sandbox template storybook with test stories

yarn task

As above, but gives you options to customize the sandbox (e.g. selecting other frameworks)

yarn lint

boolean check if code conforms to linting rules - uses remark & eslint

  • yarn lint:js - will check js
  • yarn lint:md - will check markdown + code samples
  • yarn lint:js --fix - will automatically fix js

yarn test

boolean check if unit tests all pass - uses jest

  • yarn run test --core --watch - will run core tests in watch-mode

Sponsors

Become a sponsor to have your logo and website URL on our README on Github. [Become a sponsor]

Backers

By making a recurring donation, you can support us and our work. [Become a backer]

License

MIT

-the end-