UNPKG

1.58 kBMarkdownView Raw
1# Storybook for React
2
3Storybook for React is a UI development environment for your React components.
4With it, you can visualize different states of your UI components and develop them interactively.
5
6![Storybook Screenshot](https://github.com/storybooks/storybook/blob/master/media/storybook-intro.gif)
7
8Storybook runs outside of your app.
9So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
10
11## Getting Started
12
13```sh
14cd my-react-app
15npx -p @storybook/cli sb init
16```
17
18For more information visit: [storybook.js.org](https://storybook.js.org)
19
20---
21
22Storybook also comes with a lot of [addons](https://storybook.js.org/addons/introduction) and a great API to customize as you wish.
23You can also build a [static version](https://storybook.js.org/basics/exporting-storybook) of your storybook and deploy it anywhere you want.
24
25Here are some featured storybooks that you can reference to see how Storybook works:
26
27- [Demo of React Dates](http://airbnb.io/react-dates/) - [source](https://github.com/airbnb/react-dates)
28- [Demo of React Native Web](http://necolas.github.io/react-native-web/storybook/) - [source](https://github.com/necolas/react-native-web)
29
30## Typescript
31
32If you are using Typescript, make sure you have the type definitions installed via `yarn add @types/node @types/react @types/storybook__react --dev`.
33
34## Docs
35
36- [Basics](https://storybook.js.org/basics/introduction)
37- [Configurations](https://storybook.js.org/configurations/default-config)
38- [Addons](https://storybook.js.org/addons/introduction)