Setup Mantine in Storybook
Note that this guide covers only Storybook 7.0+ integration. If you are using older version of Storybook, it will not work for you.
If you already have Storybook in your application, you can skip this step.
Follow Storybook getting started guide to add Storybook to your application:
@storybook/addon-styling-webpack is required only if you are
not using Vite. If you are using Vite, do not install
@storybook/addon-styling-webpack and do not add it to the addons section in
Install Storybook addons:
Add addons to
To shared theme object between your application and Storybook, create
src/theme.ts (or any other path in your application) file with your theme override:
Then you will be able to use the same theme both in your application and Storybook:
.storybook/preview.tsx file does not exist, create it and add
the following content:
All set! Start Storybook: