Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
Installations
npm install @storybook/addon-jest
Score
49.6
Supply Chain
86.7
Quality
99.5
Maintenance
100
Vulnerability
99.3
License
Releases
v8.5.0-alpha.11
Published on 27 Nov 2024
v8.5.0-alpha.10
Published on 23 Nov 2024
v8.4.5
Published on 20 Nov 2024
v8.5.0-alpha.9
Published on 20 Nov 2024
v8.5.0-alpha.8
Published on 19 Nov 2024
v8.5.0-alpha.7
Published on 19 Nov 2024
Developer
Developer Guide
Module System
CommonJS, ESM
Min. Node Version
Typescript Support
Yes
Node Version
NPM Version
Statistics
84,769 Stars
64,197 Commits
9,335 Forks
932 Watching
579 Branches
1,959 Contributors
Updated on 28 Nov 2024
Bundle Size
3.21 kB
Minified
1.46 kB
Minified + Gzipped
Languages
TypeScript (72.74%)
JavaScript (24.62%)
MDX (1.13%)
Svelte (0.67%)
Vue (0.3%)
HTML (0.22%)
CSS (0.2%)
EJS (0.06%)
Pug (0.04%)
Handlebars (0.02%)
Shell (0.01%)
Total Downloads
Cumulative downloads
Total Downloads
16,302,601
Last day
-10.6%
11,716
Compared to previous day
Last week
2.7%
67,074
Compared to previous week
Last month
2.4%
287,644
Compared to previous month
Last year
-7.5%
3,977,439
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
4
Peer Dependencies
1
Dev Dependencies
5
Build bulletproof UI components faster
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!
Table of contents
- 🚀 Getting Started
- 📒 Projects
- 🏅 Badges & Presentation materials
- 👥 Community
- 👏 Contributing
- 👨💻 Development scripts
- 💸 Sponsors
- 💵 Backers
- :memo: License
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 | ||
Angular | ||
Vue 3 | ||
Web components | ||
React Native | ||
HTML | ||
Ember | ||
Svelte | ||
Preact | ||
Qwik | ||
SolidJS | ||
Android, iOS, Flutter |
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.
1[![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
- Tweeting via @storybookjs
- Blogging at storybook.js.org and Medium
- Chatting on Discord
- Videos and streams at YouTube
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 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 jsyarn lint:md
- will check markdown + code samplesyarn 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
-the end-
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
11 out of 11 merged PRs checked by a CI test -- score normalized to 10
Reason
42 different organizations found -- score normalized to 10
Details
- Info: contributors work for AEB-labs,AtomLinter,Bambuu,ComponentDriven,DiscoverMeteor,M-GaTE,aeb-labs @storybooks,akurulk,async-library,bridge-school,chroma software,chromatic,chromatic (we're hiring),chromaui,chromaui / @storybookjs,cycle-game,defined networking,dependencies-io,eslint,fossasia,freelancer,gdi4k,jetbrains,lab80,legitimatetech,maintainers,meteorhacks,minum,ngx-rocket,nko4,nko5,normative-io,oortcloud,percolatestudio,prolong.io,sem-js,simple-xmpp,sourcejs,storybook-vue,storybookjs,talentsoft,twitter.com/codebyalex
Reason
no dangerous workflow patterns detected
Reason
update tool detected
Details
- Info: Dependabot detected
Reason
license file detected
Details
- Info: : LICENSE:1
Reason
30 commit(s) out of 30 and 11 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
- Info: security policy detected in current repo: SECURITY.md:1
Reason
no vulnerabilities detected
Reason
9 out of last 12 changesets reviewed before merge -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/canary-release-pr.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/canary-release-pr.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary-release-pr.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/canary-release-pr.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary-release-pr.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/canary-release-pr.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary-release-pr.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/canary-release-pr.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/canary-release-pr.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/canary-release-pr.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cron-weekly.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/cron-weekly.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/cron-weekly.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/cron-weekly.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/danger-js.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/danger-js.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/danger-js.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/danger-js.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/danger-js.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/danger-js.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-sandboxes.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-sandboxes.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate-sandboxes.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-sandboxes.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-sandboxes.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate-sandboxes.yml:123: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/handle-release-branches.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/handle-release-branches.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/handle-release-branches.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/handle-release-branches.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/handle-release-branches.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/handle-release-branches.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/handle-release-branches.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/handle-release-branches.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/prepare-non-patch-release.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-non-patch-release.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/prepare-non-patch-release.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-non-patch-release.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/prepare-non-patch-release.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-non-patch-release.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/prepare-non-patch-release.yml:181: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-non-patch-release.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/prepare-patch-release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-patch-release.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/prepare-patch-release.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-patch-release.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/prepare-patch-release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-patch-release.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/prepare-patch-release.yml:186: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-patch-release.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/publish.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/publish.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/publish.yml/next?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:198: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/publish.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/stale.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests-unit.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/tests-unit.yml/next?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests-unit.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/tests-unit.yml/next?enable=pin
- Info: Dockerfile dependencies are pinned
- Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles
- Info: no insecure (not pinned by hash) dependency downloads found in shell scripts
Reason
no badge detected
Reason
project is not fuzzed
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 29 are checked with a SAST tool
- Warn: CodeQL tool not detected
Reason
non read-only tokens detected in GitHub workflows
Details
- Warn: no topLevel permission defined: .github/workflows/cron-weekly.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/cron-weekly.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/danger-js.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/danger-js.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/generate-sandboxes.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/generate-sandboxes.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/handle-release-branches.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/handle-release-branches.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/prepare-non-patch-release.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-non-patch-release.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/prepare-patch-release.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/prepare-patch-release.yml/next?enable=permissions
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/publish.yml/next?enable=permissions
- Info: topLevel permissions set to 'read-all': .github/workflows/scorecards.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/scorecards.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/stale.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/stale.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/tests-unit.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/tests-unit.yml/next?enable=permissions
- Warn: no topLevel permission defined: .github/workflows/trigger-circle-ci-workflow.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/storybookjs/storybook/trigger-circle-ci-workflow.yml/next?enable=permissions
Score
7.2
/10
Last Scanned on 2024-03-19
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @storybook/addon-jest
@storybook/addon-controls
Interact with component inputs dynamically in the Storybook UI
@storybook/addon-toolbars
Create your own toolbar items that control story rendering
@storybook/addon-actions
Get UI feedback when an action is performed on an interactive element
@storybook/addon-backgrounds
Switch backgrounds to view components in different settings