Follow the prompts after running this command in your Preact project's root directory:
npx storybook@latest init
More on getting started 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
Install the framework:
yarn add --dev @storybook/preact-vite
Update your main.js
to change the framework property:
// .storybook/main.js
export default {
// ...
framework: {
name: '@storybook/preact-vite', // <- Change this
options: {},
},
};