Installation

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

Add @nuxtjs/storybook dependency to your project:

Yarn
yarn add --dev @nuxtjs/storybook
NPM
npm install --save-dev @nuxtjs/storybook
Note: Nuxt Storybook requires `nuxt >=2.15.3`. You can either use latest version of `nuxt` or install `nuxt-edge` package instead.

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

.gitignore
.nuxt-storybook
storybook-static

That's it ✨!

Now you can start adding stories .

Configuration

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 Mon, Sep 11, 2023