Vue

Storybook for Vue & Rsbuild is a framework that makes it easy to develop and test UI components in isolation for Vue applications built with Rsbuild.

Requirements
  • Vue ≥ 3
  • @rsbuild/core ≥ 1.0.1
  • Storybook ≥ 8.2.1

Getting started

Use with Vue in a existing Rsbuild project.

Installation

To use Vue with Storybook, you need to install the storybook-vue-rsbuild package.

npm
yarn
pnpm
bun
npm storybook-vue-rsbuild -D

Setup .storybook/main.ts

import { StorybookConfig } from 'storybook-vue-rsbuild'

const config: StorybookConfig = {
  framework: 'storybook-vue-rsbuild',
  rsbuildFinal: (config) => {
    // Customize the final Rsbuild config here
    return config
  },
}

export default config

You're all set now. You could also check out the example in sandboxes/vue3 and use all other features listed in Storybook site.