Setup

Using Storybook in your NuxtJS project is only one command away ✨

Installation

Add @nuxtjs/storybook dependency to your project:

yarn add --dev @nuxtjs/storybook postcss@latest
npm install --save-dev @nuxtjs/storybook postcss@latest

Next, add .nuxt-storybook and storybook-static to your .gitignore:

.gitignore
.nuxt-storybook
storybook-static

That's it ✨!

Now you can start adding stories.

Configure

Then, add storybook section in nuxt.config.js:

nuxt.config.js
export default {
  storybook: {
    // Options
  }
}

See module options.

Edit this page on GitHub Updated at Wed, Apr 14, 2021