Tailwindcss Dark Mode Toggle

tiny tailwindcss dark mode toggle

View on Github

Storybook Addon: Tailwindcss Dark Mode Toggle

Tiny tailwindcss dark mode toggle. It will add data-theme="dark" as well as class="dark" to the <html /> element.

Example showing the data-theme and class applied to html tag

Installation

npm i -D storybook-addon-tw-dm-toggle

Usage

// .storybook/main.js

module.exports = {
  addons: ['storybook-addon-tw-dm-toggle'],
};

License

MIT

Made by
  • _mehrad
    _mehrad
Work with
    Angular
    Ember
    HTML
    Preact
    React
    Svelte
    Vue
    Web Components
Tags