Skip to content
PluginStats

tailwindcss-theme-variants weekly downloads statistics

By JakeNavith · npm · Tailwind plugins

Media-query- or JavaScript-based theme variants with fallback for Tailwind CSS

View on npm Fresh · Oct 17, 2026

tailwindcss-theme-variants has 456 recorded weekly downloads on npm, a decrease of 76.4% over the past 30 days.

It ranks #1508 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -49.2%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
456
Official API · Oct 17, 2026
7-day growth
-82.7%
-2.2K weekly downloads
30-day growth
-76.4%
-1.5K weekly downloads
90-day growth
-49.2%
-441 weekly downloads
Rank
#1508
Among tracked npm listings

About tailwindcss-theme-variants

🌗 Tailwind CSS Theme Variants

This Tailwind CSS plugin registers variants for theming beyond just light and dark modes *without needing custom properties*. It has support for • Controlling themes with • Media queries, like prefers-color-scheme, print, or anything you want • CSS selectors, like classes and data attributes • Or both at the same time! • Responsive variants • Stacking on extra variants, like hover so you can change a link's hover color depending on the theme • Falling back to a certain theme when no other one could become active, like if a visitor's browser doesn't support JavaScript or the new prefers- media queries • As many themes as you want: light theme, dark theme, red theme, blue theme—just bring your own definitions! The experimental semantics feature makes multiple themes easy to deal with!

You are recommended to check out the comparison table of all Tailwind CSS theming plugins below before committing to any one. By the way, you might have noticed this plugin's documentation / README is *very* long—don't let that frighten you! I designed it to be *overdocumented* and as exhaustive as possible, and since most of it is long code snippets, it's shorter than it looks *and* you don't need to go through it all to do well!

What about Tailwind's upcoming official dark mode?

This plugin will still be maintained! Light and dark mode support is just *one* thing this plugin can do, and the complexity this plugin can provide will not be reflected in Tailwind core (see Design Rationale), so I will still need this around.

⬇️ Installation

🛠 Basic usage

Using selectors to choose the active theme

With this Tailwind configuration,

this CSS is generated:

After also enabling "light" and "dark" variants for textColor and bringing in more colors from the default palette, we can implement a simple themed button in HTML like this:

This will result in dark blue text on a light blue background in the light theme, and light blue text on a dark blue background in the dark theme.

💡 You can choose more than just classes for your selectors. Other, good options include data attributes, like [data-padding=compact]. You *can* go as crazy as .class[data-theme=light]:dir(rtl), for example, but I think that's a bad idea!

Using media queries to choose the active theme

You may rather choose to tie your theme selection to matched media queries, like prefers-color-scheme:

Which generates this CSS:

Keep the variants listed in the same order as in themes in this plugin's configuration for consistency and the most expected behavior: in backgroundColor's variants, light came first, then dark, so we also list light before dark in themeVariants's themes option.

💡 The group feature will take care of this for you!

⚙️ Full configuration

This plugin expects configuration of the form

Where each parameter means:

• group (defaults to not making a group name): the name of the group of themes in this configuration. For example, a sensible name for light and dark would be themes or modes. This will create a themes (or modes) variant that can be listed in variants to generate all the CSS for both light and dark themes in the correct order (matching your configuration). If you want to stack variants (explained in the variants description below), like focus, then similarly named variants like themes:focus will be created. • themes: an object mapping a theme name to the conditions that determine whether or not the theme will be active. • selector: this theme will be active when this selector is on baseSelector. For instance, if baseSelector is html, and the light theme's selector is .light-theme, then the light theme variants will be in effect whenever html has the light-theme class on it. • mediaQuery: this theme will be active when this media query is active. For instance, if the reduced-motion theme has mediaQuery "@media (prefers-reduced-motion: reduce)" (importable as prefersReducedMotion), then the reduced-motion theme variants will be active whenever that media query matches: if the visitor's browser reports preferring reduced motion. • baseSelector (default "" (empty string) if you only use media queries to activate your themes, otherwise ":root"): the selector that each theme's selector will be applied to to determine the active theme. • fallback (default false): when none of the given media queries or selectors are active, then the first theme you listed in themes will activate. You can think of it as the *default* theme for your site.

If you pass fallback: "compact", then your CSS file size will be drastically reduced for free because redundant things will be "canceled out." You are recommended to try this feature and only switch back to true if you encounter issues (which you should please report 😁), because it will become the default option in the future.

• variants (default is {}): an object mapping the name of a variant to a function that gives a selector for when that variant is active. These will be merged with the default variants rather than replace them—this means it works like Tailwind's extend feature.

For example, the default even variant takes a selector and returns ` ${selector}:nth-child(even) . The default group-hover variant returns .group:hover ${selector} `

Each given name and function pair will create an appropriately named variant in combination with each theme for use in the variants section of your Tailwind CSS config, like amoled:my-hover if you have an amoled theme and a my-hover variant in this plugin's configuration. Either way, because hover is one of the default variants, amoled:hover will be created too.

Examples

💡 If you want to see the plugin get stretched to its limits, see the test suite in the tests directory.

Theme groups

Specifying group in this plugin's configuration will create a magical variant you can use in place of manually typing out every single theme's name in the Tailwind variants section!

For instance, you saw before that…

Description from the npm listing.

  • plugin
  • tailwind
  • tailwindcss
  • tailwindcss-plugin
  • tailwindcss-theme
  • tailwindcss-themes

Where tailwindcss-theme-variants sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,248 listings · 113 pages · page 76, #9 (overall #1509)
All npm: every listing in weekly downloads order
PNG SVG
Tailwind plugins251 listings · 13 pages · page 2, #8 (overall #28)
Tailwind plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

tailwindcss-theme-variants weekly downloads on npm, last 90 days: 456 weekly downloads as of Oct 17, 2026, -49.2% over 90 days.tailwindcss-theme-variantsWeekly downloads on npm · Last 90 days456downloads / week-49.2% over 90 days01K2K3K4K5K6KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
tailwindcss-theme-variants weekly downloads on npm, last 90 days: 456 weekly downloads as of Oct 17, 2026, -49.2% over 90 days.
PNG SVG

7/30/90-day growth

tailwindcss-theme-variants weekly downloads growth on npm: -82.7% over 7 days, -76.4% over 30 days, -49.2% over 90 days.tailwindcss-theme-variantsWeekly downloads growth on npm456downloads / week now7-day growth-2,176 weekly downloads-82.7%30-day growth-1,477 weekly downloads-76.4%90-day growth-441 weekly downloads-49.2%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
tailwindcss-theme-variants weekly downloads growth on npm: -82.7% over 7 days, -76.4% over 30 days, -49.2% over 90 days.
PNG SVG

Ranking history

tailwindcss-theme-variants npm ranking history: currently #1508 (by weekly downloads).tailwindcss-theme-variantsnpm ranking · by weekly downloads · Last 90 days#1508current rank#400#600#800#1000#1200#1400#1600Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 17, 2026 – Oct 18, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
tailwindcss-theme-variants npm ranking history: currently #1508 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (543)
Recent weekly downloads observations for tailwindcss-theme-variants
Date (UTC)Weekly downloadsChange vs. previous
456-57
513-72
585-394
979-538
1,5170
1,517-608
2,125-507
2,632-405
3,037-355
3,392-591
3,983-564
4,547-780
5,327+8
5,319—

Similar npm Tailwind plugins plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/tailwindcss-theme-variants. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.