New
NextJS, SvelteKit, Remix and the future of StorybookAutomate with Chromatic
Star75,387
Back to integrations
Add your integration
Categories
  • ⭐️ Popular
  • 🧩 Essentials
  • 🛠 Code
  • ⚡️ Data & state
  • ✅ Test
  • 💅 Style
  • 🎨 Design
  • ⚙️ Appearance
  • 🗄 Organize
How to install addons Create an addon
Theme Selector
Switch between different style sheets
npm install css-stylesheet-switcher
Last updated over 1 year ago
0
Downloads per week
Readme View on GitHub

CSS Stylesheet selector


Easily add additional stylesheets to switch between your stories.

Install


npm i css-stylesheet-switcher

Usage


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

addParameters({
    themeStylesheetSelector: {
        stylesheets: [
            {
                id: 'Theme 1',
                title: 'Theme 1',
                url: 'css/someCss1.css'
            },
            {
                id: 'Theme 2',
                title: 'Theme 2',
                url: 'css/someCss2.css'
            }
        ]
    }
});
Join the community
5,862 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI