storybook-addon-tw-dm-toggle
TypeScript icon, indicating that this package has built-in type declarations

7.0.19 • Public • Published

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

Package Sidebar

Install

npm i storybook-addon-tw-dm-toggle

Weekly Downloads

338

Version

7.0.19

License

MIT

Unpacked Size

27.9 kB

Total Files

20

Last publish

Collaborators

  • _mehrad