mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-20 05:02:37 +08:00
Storybook Addon Backgrounds
Storybook Addon Backgrounds can be used to change background colors inside the preview in Storybook.
Installation
Backgrounds is part of essentials and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run:
npm i -D @storybook/addon-backgrounds
Configuration
Then, add following content to .storybook/main.js
:
module.exports = {
addons: ['@storybook/addon-backgrounds'],
};
Usage
The usage is documented in the documentation.