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 11 months ago
229
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,562 developers and counting
WhyWhy StorybookComponent-driven UI
DocsGuidesTutorialsChangelogTelemetryStatus
CommunityIntegrationsGet involvedBlog
ShowcaseExploreProjectsComponent glossary
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI