Getting Started

Options

Configuration options for the Nuxt Storybook module.

Configure Nuxt Storybook with the storybook property.

nuxt.config.ts
export default {
  // Defaults options
  storybook: {
    host: 'http://localhost',
    port: 6006,
  },
}
  • enabled: Enable or disable the module. This can be useful to control and disable storybook in layers or in extended projects.
    • type: boolean
    • default: true
  • route: The route where the Storybook application will be available in development mode.
    • type: string
    • default: /_storybook
  • port: The port where the Storybook application server will be started.
    • type: number
    • default: 6006
  • host: The host where the Storybook application server will be started.
    • type: string
    • default: Environment variable STORYBOOK_HOST or http://localhost
  • logLevel: Log level for the terminal output.
    • type: number
    • default: nuxt.options.logLevel
  • https: Serve Storybook over HTTPS.
    Note: You must provide your own certificate information. You can use https://mkcert.dev/ for example.
    • type: boolean or { key: string; cert: string }
    • default: false
    • example:
      nuxt.config.ts
      storybook: {
        https: {
          key: './secrets/key.pem',
          cert: './secrets/cert.pem',
        }
      }
      

Made with Nuxt UI Pro