• Stars
    star
    209
  • Rank 181,880 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated 15 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐ŸŒ The website for storybook.js.org

Storybook website

Storybook is the most popular UI component explorer! This is the website for https://storybook.js.org/.

Note: This is not the docs, those are located here.

๐Ÿ›  Contributing

Contributions welcome! If itโ€™s something small like grammar or punctuation, open up a pull request. If itโ€™s a bigger change or new feature, add an issue for discussion.

Workflow

  1. Feature idea or bugfix?
  2. Build new UI or tweak existing UI in Storybook first
  3. Integrate with Gatsby
  4. Ensure tests pass in Circle CI storybooks/frontpage
  5. Ensure site works and is QAed via Netlify previews
  6. Ensure no visual bugs in Chromatic storybooks/frontpage
  7. Pull request

Running the project locally

๐Ÿ“• Storybook instructions

The Storybook for Storybook contains every UI component. The UI is built following Component-Driven Development, a process that builds UIs from the โ€œbottom upโ€ starting with components and ending with screens. That means contributors should compose UIs in Storybook before integration with the Gatsby app.

  1. yarn install
  2. yarn build
  3. yarn run storybook

Gatsby instructions

Gatsby is used for basic routing and static site generation.

  1. yarn start to run the entire site

  2. yarn start:skip-addons to skip building the addon catalog

  3. yarn start:docs-only to mock the home page and build the docs pages

Docs content

The content for the documentation section is in the docs/ subdirectory of the Storybook monorepo: https://github.com/storybookjs/storybook/tree/next/docs.

To run this app while editing those files, checkout both this repository and the monorepo, then:

Inside the storybook monorepo:

  1. Run the yarn task command and then select the Synchronize documentation (sync-docs) option.

  2. Provide the path to the frontpage project.

With this, the folders storybook/docs and frontpage/src/content/docs will be synchronized, ensuring that any changes made to the documentation in the Storybook monorepo will be reflected in the Storybook website docs.

Inside the frontpage repository:

To run the website documentation, use the following command:

yarn start:docs-only

The project will be visualized in the browser at http://localhost:8000

Release notes

Release notes are stored in the src/content/releases directory as .md files. The name of the file corresponds with the version (major.minor) of the release and will be used to populate the link to the specific release from the releases page.

Within the release's .md file, frontmatter is used to create a page title, while the rest of the content is parsed using gatsby-transformer-remark and styled with selectors in src/styles/formatting.js.

Publishing new versions

See detailed docs

Environment variables

In development and with local production builds, environment variables can be configured with .env files as explained here. Variables are prefixed with GATSBY_ when that variable needs to be available in client-side code.

In deploy previews and production deploys, these variables are set with Netlify's build variables.

Search

Search within the docs is powered by DocSearch. In order for this to work, an environment variable is required:

GATSBY_ALGOLIA_API_KEY

How to setup on your machine:

  1. Create a .env.development file locally
  2. Get the key here: https://app.netlify.com/sites/storybook-frontpage/settings/deploys#environment
  3. Add GATSBY_ALGOLIA_API_KEY=key to the file from step 1

The site is crawled every 24 hours so any updates will be reflected in that amount of time.

Blog posts

The latest blog post is fetched from Ghost. You will need to add in order for this to work, an environment variable is required:

GHOST_STORYBOOK_API_KEY

How to setup on your machine:

  1. Create a .env.development file locally
  2. Get the key here: https://storybookblog.ghost.io/ghost
  3. Add GHOST_STORYBOOK_API_KEY=key to the file from step 1

Tooling

This project uses these tools to make our job easier.

๐Ÿ’ซ Deploys by Netlify

Main and branches are automatically deployed by Netlify every commit.

๐Ÿ–ผ Visual testing by Chromatic

All stories in the Storybook are automatically visual tested on desktop and mobile each commit. Ensure all baselines are โœ… accepted before merging.

๐Ÿšฆ Continuous integration by Circle CI

Every build a test suite runs. Ensure there are no errors before merging.

More Repositories

1

storybook

Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
TypeScript
82,383
star
2

design-system

๐Ÿ—ƒ Storybook Design System
TypeScript
1,862
star
3

react-native

๐Ÿ““ Storybook for React Native!
TypeScript
942
star
4

builder-vite

A builder plugin to run and build Storybooks with Vite
TypeScript
884
star
5

addon-designs

A Storybook addon that embeds Figma, websites, or images in the addon panel.
TypeScript
851
star
6

react-inspector

๐Ÿ” Power of Browser DevTools inspectors right inside your React app
TypeScript
740
star
7

testing-react

Testing utilities that allow you to reuse your Storybook stories in your React unit tests!
TypeScript
589
star
8

presets

๐Ÿงฉ Presets for Storybook
TypeScript
424
star
9

marksy

๐Ÿ“‘ A markdown to custom VDOM components library
JavaScript
354
star
10

vue-cli-plugin-storybook

Vue CLI plugin for Storybook
JavaScript
280
star
11

addon-jsx

This Storybook addon show you the JSX / template of the story
TypeScript
237
star
12

eslint-plugin-storybook

๐ŸŽ—Official ESLint plugin for Storybook
TypeScript
228
star
13

test-runner

๐Ÿš• Turn stories into executable tests
TypeScript
202
star
14

storybook-addon-console

storybook-addon. Redirects console output into action logger panel
TypeScript
198
star
15

native

๐Ÿ“ฑ Storybook for Native: iOS, Android, Flutter
TypeScript
176
star
16

babel-plugin-react-docgen

๐Ÿ“ Babel plugin to add react-docgen info into your code.
JavaScript
162
star
17

telejson

๐Ÿ›ฐ JSON parse & stringify with support for cyclic objects, functions, dates, regex, infinity, undefined, null, NaN, Classes, Instances
TypeScript
158
star
18

vs-code-plugin

Aesop: a VSCode Extension to stage Storybook stories inside your IDE.
TypeScript
130
star
19

addon-kit

Everything you need to build a Storybook addon
TypeScript
122
star
20

brand

๐ŸŽจ Materials for your articles and talks about storybook
89
star
21

addon-svelte-csf

[Incubation] CSF using Svelte components.
TypeScript
86
star
22

desktop

๐Ÿ’ป Desktop app for all your Storybooks
JavaScript
71
star
23

addon-react-native-web

Build react-native-web projects in Storybook for React
TypeScript
71
star
24

testing-library

Instrumented version of Testing Library for Storybook Interactions
TypeScript
56
star
25

require-context.macro

๐Ÿ–‡ A Babel macro needed for some advanced Storybook setups. Used to mock webpack's context function in test environments.
JavaScript
48
star
26

addon-styling

A base addon for configuring popular styling tools
TypeScript
44
star
27

ember-cli-storybook

๐Ÿ“’ Ember storybook adapter
JavaScript
36
star
28

solidjs

SolidJS integration for Storybook, maintained by the community
TypeScript
35
star
29

aem

Adobe Experience Manager Storybook app with events, knobs, docs, addons, and more
JavaScript
33
star
30

paths.macro

๐Ÿ‘ฃ Babel plugin that returns an object containing paths like __dirname and __filename as static values
JavaScript
32
star
31

shout-out-kit

An image generation API template
JavaScript
30
star
32

linter-config

๐Ÿ“ ESlint config, Prettier config, Remark config for storybook
JavaScript
27
star
33

SBNext

A future SB
JavaScript
26
star
34

sandboxes

MDX
25
star
35

addon-measure

JavaScript
20
star
36

addon-postcss

This Storybook addon can be used to run the PostCSS preprocessor against your stories.
JavaScript
20
star
37

addon-styling-webpack

Successor to @storybook/addon-styling. Configure the styles of your webpack storybook with ease!
TypeScript
18
star
38

jest

Instrumented version of Jest for Storybook Interactions
TypeScript
18
star
39

addon-coverage

TypeScript
18
star
40

nextjs-example

Example app showing Storybook integrated with Next.js (v11) pages
JavaScript
17
star
41

testing-vue3

Testing utilities that allow you to reuse your stories in your unit tests
TypeScript
16
star
42

bench

Storybook benchmark
TypeScript
15
star
43

testing-angular

TypeScript
13
star
44

mdx2-csf

MDX to CSF compiler using MDXv2
TypeScript
13
star
45

addon-knobs

Storybook addon prop editor component
TypeScript
10
star
46

testing-vue

TypeScript
10
star
47

jest-storybook

Test storybook stories automagically using Jest. ๐Ÿง™๐Ÿปโ€โ™€๏ธ
JavaScript
9
star
48

addon-google-analytics

Storybook addon for google analytics
JavaScript
9
star
49

expect

Browser-compatible version of Jest's `expect`
JavaScript
7
star
50

storybook-nuxt

Storybook integration for Nuxt Framework - Unleashing the power of Storybook in Nuxt/Vue Land!
TypeScript
6
star
51

raycast-extension-sandboxes

A Raycast Extension to quickly create sandboxes online or locally
TypeScript
6
star
52

icons

Library of icons used in apps and marketing sites
TypeScript
6
star
53

vue3-code-examples

it is a repo to show Vuetify implementation with new @storybook/vue3 reactive mode
TypeScript
6
star
54

marko

Storybook framework support for marko
TypeScript
6
star
55

addon-graphql

Storybook addon to display the GraphiQL IDE
TypeScript
6
star
56

addon-onboarding

TypeScript
6
star
57

action

๐Ÿšข WIP, storybook github action - build your storybook from github
JavaScript
6
star
58

addon-queryparams

parameter addon for storybook
TypeScript
6
star
59

storybook-day

Storybook day website
TypeScript
5
star
60

addon-ie11

JavaScript
5
star
61

addon-design-assets

Design asset preview for storybook
JavaScript
5
star
62

addon-cssresources

A storybook addon to switch between css resources at runtime for your story
TypeScript
5
star
63

create-svelte-with-args

A small CLI wrapper around the create-svelte package that enables you to replace the interactive prompts with CLI arguments.
JavaScript
5
star
64

addon-events

Add events to your Storybook stories.
TypeScript
4
star
65

governance

โš–๏ธ Storybook governance and community policies
4
star
66

community

๐Ÿ™Œ Storybook community resources: monthly meetings, meetups, conferences
4
star
67

mdx1-csf

MDX to CSF compiler using MDXv1
TypeScript
4
star
68

addon-react-native-server

A replacement for @storybook/react-native-server which will enable multiple devices to sync over websockets
TypeScript
4
star
69

docs-mdx

TypeScript
3
star
70

addon-angular-ivy

TypeScript
3
star
71

babel-plugin-named-exports-order

Babel plugin for preserving exports order across transforms
JavaScript
3
star
72

nextjs-server

Embedded Storybook in Next.js
TypeScript
3
star
73

addon-bench

Storybook benchmarking helper
JavaScript
3
star
74

repro-react-cra

Reproduction template for Create React App
JavaScript
3
star
75

react-native-demo

Storybook for React Native monorepo
2
star
76

ember

Storybook for Ember
TypeScript
2
star
77

docs2-prototype

TypeScript
2
star
78

components-marketing

TypeScript
2
star
79

repro-templates

WIP
JavaScript
2
star
80

eslint-config-storybook

๐Ÿ”— wrapper around our @storybook/linter-config package
JavaScript
2
star
81

.github

Repo community health files
1
star
82

regression-test-other

1
star
83

e2e-testing-starter

JavaScript
1
star
84

vue3-autogen-controls

TypeScript
1
star
85

stencil-builder-test

TypeScript
1
star
86

auto-config

TypeScript
1
star
87

external-sandboxes

MDX
1
star
88

create-webpack5-react

JavaScript
1
star
89

playwright-ct

Playwright component testing against a Storybook instance
TypeScript
1
star
90

regression-test-preact

1
star
91

addon-webpack5-compiler-babel

Adds babel as a Webpack5 compiler to Storybook
TypeScript
1
star
92

web

TypeScript
1
star