Storybook for Vue & Rsbuild helps you preview and iterate on Vue components with the same Rsbuild configuration you use for your application.
| Package | Version |
|---|---|
vue | ≥ 3 |
@rsbuild/core | ≥ 1.0.1 |
storybook | ≥ 10.0.0 |
Use the steps below in an existing Rsbuild-based Vue project.
Install the Vue framework package to enable Storybook support.
npm install storybook-vue3-rsbuild -D.storybook/main.tsimport { StorybookConfig } from 'storybook-vue3-rsbuild'
const config: StorybookConfig = {
framework: 'storybook-vue3-rsbuild',
rsbuildFinal: (config) => {
// Customize the final Rsbuild config here
return config
},
}
export default configYou're ready to go! Check the Vue 3 sandbox for a complete reference, and explore the Storybook docs for feature guides.
Now that Storybook is running, explore how to create stories for your Vue components:
Please refer to the Configuration Guide for framework-specific options and defaults.