New
Automatic visual tests in Storybook, plus 2.2x faster build times for React+TSVisual test with Chromatic
Star80,436
Back to integrations
Add your integration
Categories
  • ⭐️ Popular
  • 🧩 Essentials
  • 🛠 Code
  • ⚡️ Data & state
  • ✅ Test
  • 💅 Style
  • 🎨 Design
  • ⚙️ Appearance
  • 🗄 Organize
How to install addons Create an addon
@inki/storybook-addon-theme
storybook addon that provides a configurable theme selector
npm install @inki/storybook-addon-theme
Last updated over 4 years ago
3
Downloads per week
Readme View on GitHub

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'
  }
});
Join the community
6,319 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI