New
Automatic visual tests in Storybook, plus 2.2x faster build times for React+TSVisual test with Chromatic
Star80,439
Back to integrations
Add your integration
Categories
  • ⭐️ Popular
  • 🧩 Essentials
  • 🛠 Code
  • ⚡️ Data & state
  • ✅ Test
  • 💅 Style
  • 🎨 Design
  • ⚙️ Appearance
  • 🗄 Organize
How to install addons Create an addon
Tailwindcss Dark Mode Toggle
tiny tailwindcss dark mode toggle
npm install storybook-addon-tw-dm-toggle
Last updated 5 months ago
19
Downloads per week
Readme 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

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