Install Styleguidist and peer dependencies from npm:
npm install --save-dev react-styleguidist react react-dom webpack
Point Styleguidist to your React components
Tell Styleguidist how to load your code
Webpack is a peer dependency but your project doesn’t have to use it. Styleguidist works with webpack 1 and webpack 2.
If you’re using Create React App you only need this:
npm install --save-dev react-styleguidist webpack
Add these scripts to your
"styleguide": "styleguidist server",
"styleguide:build": "styleguidist build"
npm run styleguide to start style a guide dev server.
npm run styleguide:build to build a static version.
See how to document your components