Material-UI boilerplate with:
@material-ui/core
v1react-scripts
(core of CRA)@storybook/react
v3/v4storybook-addon-material-ui
@next
git clone https://github.com/react-theming/create-material-ui-app.git
cd create-material-ui-app
yarn # select @storybook/react version when prompted
yarn storybook
open http://localhost:9009 in your browser
it's your Storybook with Material-UI components
Start writing new stories from src/stories/index.js
file.
Create your app as an usual CRA app.
Create Material-UI App is built on top of Create React App, which means all features that create-react-app supports are available. You can reproduce these steps to create everything from scratch or choose some of them to add needed tools to your existing project:
create-react-app
to create a project basegetstorybook
to add a storybook to your CRA projectyarn add --dev storybook-addon-material-ui@next
to add material-ui addonyarn add @material-ui/core
- install material-ui v1.xx- add
import 'storybook-addon-material-ui/register'
to.storybook/addons.js
- add
import { muiTheme } from 'storybook-addon-material-ui';
tosrc/stories/index.js
- add
.addDecorator(muiTheme())
tosrc/stories/index.js
We recommend sticking with this boilerplate for new projects since we trying to keep here the newest stable configuration.
Any feature requests, issues, PRs to this project are very welcome!
telegram:@usulpro (The quickest way to contact me ⚡)