Storybook for Preact
Requirements
Getting Started
In a project without Storybook
Follow the prompts after running this command in your Preact project's root directory:
npx storybook@latest init
More on getting started with Storybook
In a project with Storybook
This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command:
npx storybook@latest upgrade
Manual migration
Install the framework:
yarn add --dev @storybook/preact-vite
Update your main.js
to change the framework property:
export default {
framework: {
name: '@storybook/preact-vite',
options: {},
},
};