@inki/storybook-addon-theme
storybook addon that provides a configurable theme selector
npm install @inki/storybook-addon-theme
3
Downloads per week

Storybook theme addon

Notice

Only support storybook 5.x and newer.

Installation

npm i @inki/storybook-addon-theme --dev

Add to .storybook/addons.js

import '@inki/storybook-addon-theme/register';

Usage

.storybook/config.js

import { addParameters } from '@storybook/vue';

const themes = [
    {
      label: "Chalk",
      value: 'chalk'
    },
    {
      label: "Dark",
      value: "dark"
    }
];

addParameters({ 
  themes: {
    items: themes,
    // optional: set the initial active theme
    active: themes[0].value,
    // optional: set the icon used in the toolbar
    icon: 'document'
  }
});