Skip to content
PluginStats

@thiagormoreira/nightwind weekly downloads statistics

By thiagormoreira · npm · Tailwind plugins

An automatic, overridable, customisable Tailwind dark mode plugin

View on npm Fresh · Dec 6, 2026

@thiagormoreira/nightwind has 57 recorded weekly downloads on npm, an increase of 375% over the past 30 days, ranking #2748 of 3,247 tracked listings.

Weekly downloads
57
Official API · Dec 5, 2026
7-day growth
+159%
+35 weekly downloads
30-day growth
+375%
+45 weekly downloads
90-day growth
-44.7%
-46 weekly downloads
Rank
#2748
▲ 33 in 7 days

About @thiagormoreira/nightwind

Nightwind cover image

IMPORTANT: This repository is a maintained fork of the original "nightwind" project (https://github.com/jjranalli/nightwind). This fork is actively maintained, featuring 100% test coverage, support for modern Tailwind CSS (v3+), and additional features like manual dark: overrides.


A Tailwind CSS plugin that gives you an out-of-the-box, customisable, overridable dark mode.

v2.7.0


Nightwind uses the existing Tailwind color palette and your own custom colors to automatically generate the dark mode version of the Tailwind color classes you use.

For example, whenever you use a class like bg-red-600 it gets automatically switched to bg-red-300 in dark mode.

You can see it in action on https://nightwindcss.com

  1. Installation
  2. Helper functions
  3. Animation System
  4. Getting started
  5. Configuration
  6. Color mappings
  7. Overrides
  8. Typography
  9. Tailwind CSS v4 Support

Installation

npm install nightwind

Enable the Dark class variant in your tailwind.config.js file.

// tailwind.config.js - Tailwind ^2.0
module.exports = {
  darkMode: "class",
  // ...
  plugins: [require("nightwind")],
}
In older Tailwind versions (< 2.0)
// tailwind.config.js
module.exports = {
  experimental: {
    darkModeVariant: true,
    applyComplexClasses: true,
  },
  dark: "class",
  // ...
  plugins: [require("nightwind")],
}

Helper functions

Nightwind relies on a fixed 'nightwind' class to manage transitions, and a toggled 'dark' class applied on a top level element in the DOM, typically the root element.

You can define your own functions to manage the dark mode (or check the examples below), or use the helper functions included in 'nightwind/helper.js' to get started right away.

By default, the helper functions prevent the dreaded flicker of light mode and allow the chosen color mode to persist on update.

Initialization

To initialize nightwind, add the following script tag to the head element of your pages.

// React Example
import nightwind from "nightwind/helper"

export default function Layout() {
  return (
    <>
      <Head>
        <script dangerouslySetInnerHTML={{ __html: nightwind.init() }} />
      </Head>
      // ...
    </>
  )
}
Toggle

Similarly, you can use the toggle function to switch between dark and light mode.

// React Example — toggle with animation
import nightwind from 'nightwind/helper'

export default function Navbar() {
  return (
    <>
      {/* Simple toggle with default animation */}
      <button onClick={() => nightwind.toggle()}>Toggle</button>

      {/* Ripple from click point */}
      <button onClick={(e) => nightwind.toggle({ animation: 'ripple', event: e })}>
        Ripple Toggle
      </button>

      {/* Slide from left */}
      <button onClick={() => nightwind.toggle({ animation: 'slide', direction: 'left' })}>
        Slide Toggle
      </button>
    </>
  )
}
Enable mode

If you need to selectively choose between light/dark mode, you can use the enable function. It accepts a boolean argument to enable/disable dark mode.

// React Example
import nightwind from "nightwind/helper"

export default function Navbar() {
  return (
    // ...
    <button onClick={() => nightwind.enable(true)}></button>
    // ...
  )
}
BeforeTransition

Nightwind also exports a beforeTransition function that you can leverage in case you prefer to build your own toggle functions. It prevents unwanted transitions as a side-effect of having nightwind [...]

Check out the toggle function in the Nextjs example below for an example of how this could be implemented.

Animation System

Nightwind includes a built-in animation system powered by the View Transitions API. All animations fall back gracefully to a CSS transition for browsers that don't support the API.

Global Configuration

Configure the animation system once via nightwind.configure():

nightwind.configure({
  animation: {
    default: 'fade',              // Default animation for toggle/enable
    duration: 600,                // Duration in ms
    easing: 'cubic-bezier(0.7, 0, 0.3, 1)', // CSS easing or cubic-bezier
    reverse: false,               // Reverse direction on light mode
    slide: {
      direction: 'left',          // 'left' | 'right' | 'top' | 'bottom'
    },
  },
  transition: {
    duration: 400,                // CSS transition duration (ms)
    easing: 'ease-in-out',
  },
  persistence: true,              // Persist mode in localStorage
  storageKey: 'nightwind-mode',   // localStorage key
})
Per-call Options

Any option can be overridden per call:

// Use ripple just for this click
nightwind.toggle({ animation: 'ripple', event: e })

// Slide from top with custom duration
nightwind.toggle({ animation: 'slide', direction: 'top', duration: 400 })

// Disable animation for this call
nightwind.enable(true, { animation: 'none' })
Available Animations…

Description from the npm listing.

  • tailwind
  • tailwindcss
  • tailwindcss-plugin
  • dark-mode
  • dark-theme
  • postcss
  • css
  • javascript

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

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

Adoption over time

@thiagormoreira/nightwind weekly downloads on npm, last 90 days: 57 weekly downloads as of Dec 5, 2026, -44.7% over 90 days.@thiagormoreira/nightwindWeekly downloads on npm · Last 90 days57downloads / week-44.7% over 90 days020406080100120Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@thiagormoreira/nightwind weekly downloads on npm, last 90 days: 57 weekly downloads as of Dec 5, 2026, -44.7% over 90 days.

7/30/90-day growth

@thiagormoreira/nightwind weekly downloads growth on npm: +159% over 7 days, +375% over 30 days, -44.7% over 90 days.@thiagormoreira/nightwindWeekly downloads growth on npm57downloads / week now7-day growth+35 weekly downloads+159%30-day growth+45 weekly downloads+375%90-day growth-46 weekly downloads-44.7%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@thiagormoreira/nightwind weekly downloads growth on npm: +159% over 7 days, +375% over 30 days, -44.7% over 90 days.

Ranking history

@thiagormoreira/nightwind npm ranking history: currently #2748 (by weekly downloads).@thiagormoreira/nightwindnpm ranking · by weekly downloads · Last 90 days#2748current rank#1800#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@thiagormoreira/nightwind npm ranking history: currently #2748 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 138, #8 (overall #2,748)
All npm: every listing in weekly downloads order

Listing placement

Tailwind plugins292 listings · 15 pages · page 7, #13 (overall #133)
Tailwind plugins: every listing in weekly downloads order

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.

Each band is one page of 20. Weekly downloads on a linear 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.

Recent observations

Full history (170)
Recent weekly downloads observations for @thiagormoreira/nightwind
Date (UTC)Weekly downloadsChange vs. previous
57+1
56-1
57+35
22-1
23+1
22+19
3-19
220
22+1
21+1
20+1
190
19-1
20—

Similar npm Tailwind plugins plugins

All 20 @thiagormoreira/nightwind alternatives

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/@thiagormoreira/nightwind. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.