Getting Started#

1. Install the cli#

First install the cli with

sh
1
npm i -g @vitro/cli

2. Init the project#

Now go inside your react project directory and create a default config with

sh
1
vitro init

The command above creates a vitro.config.js config file and some example stories

js
1
// vitro.config.js
2
module.exports = {
3
globs: ['./**/*.story.tsx'], // glob to your stories
4
}

3. Start the server#

Now you can start the server with

sh
1
vitro dev

This will start a web server on localhost:7007 with your stories

Getting Started