Addon for storybook which wraps Mantine components with a MantineProvider. Allows you to switch between themes and see how your components and pages will look.
Storybook-addon-mantine is an addon for Storybook that wraps Mantine components with a MantineProvider. It allows users to switch between themes and see how their components and pages will look.
To use the Storybook-addon-mantine:
.storybook/main.js file..storybook/preview.js file.Here are the specific steps:
.storybook/main.js file:// Register the addon
addons: [
'@storybook/addon-mantine',
],
.storybook/preview.js file:// Pass the theme(s) to the addon
export const decorators = [
withThemesProvider(themesList, mantineProviderProps),
];
Please note that themeName is an optional key you can provide to override the name shown in the Storybook panel. It’s also recommended to set withGlobalStyles to true if you use dark mode.
For more information about how to use the addon, please refer to the documentation at [addon documentation link].
Storybook-addon-mantine is a useful addon for Storybook that allows users to easily switch between themes and see how their Mantine components and pages will look. It provides a straightforward installation process and offers customization options such as passing themes and MantineProvider props. The addon is built upon the foundation laid by storybook-addon-material-ui.