Storybook for React & Rsbuild lets you develop and test React components in isolation using the Rsbuild toolchain your app already relies on.
Follow these steps inside an existing Rsbuild-powered React project.
Install the framework package to enable React support.
npm install storybook-react-rsbuild -D.storybook/main.tsimport { StorybookConfig } from 'storybook-react-rsbuild'
const config: StorybookConfig = {
framework: 'storybook-react-rsbuild',
rsbuildFinal: (config) => {
// Customize the final Rsbuild config here
return config
},
}
export default configThat's it! Explore the React 16 and React 18 sandboxes for full examples, and continue learning from the Storybook documentation.
Refer to the framework's types.ts for the complete option list.