JSPM

@storybook/addon-backgrounds

6.5.0-alpha.31
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6974038
  • Score
    100M100P100Q230794F
  • License MIT

Switch backgrounds to view components in different settings

Package Exports

  • @storybook/addon-backgrounds
  • @storybook/addon-backgrounds/dist/cjs/index.js
  • @storybook/addon-backgrounds/dist/esm/index.js
  • @storybook/addon-backgrounds/preset
  • @storybook/addon-backgrounds/preset.js
  • @storybook/addon-backgrounds/register
  • @storybook/addon-backgrounds/register.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@storybook/addon-backgrounds) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Storybook Addon Backgrounds

Storybook Addon Backgrounds can be used to change background colors inside the preview in Storybook.

Framework Support

React Storybook Screenshot

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.