More Premium Hugo Themes Premium Tailwind Themes

Nightwind

An automatic, customisable, overridable Tailwind dark mode plugin

Nightwind

An automatic, customisable, overridable Tailwind dark mode plugin

Author Avatar Theme by jjranalli
Github Stars Github Stars: 732
Last Commit Last Commit: Feb 23, 2023 -
First Commit Created: Aug 27, 2024 -
default image

Overview:

Nightwind is a Tailwind CSS plugin that offers a customizable dark mode solution. By utilizing the existing Tailwind color palette and allowing for custom color settings, Nightwind automatically generates the dark mode versions of the Tailwind color classes used in your projects.

Features:

  • Customizable Dark Mode: Use your own custom colors alongside the Tailwind color palette to create a personalized dark mode.
  • Automatic Dark Mode Generation: Classes like bg-red-600 automatically switch to bg-red-300 when in dark mode.
  • Helper Functions: Nightwind includes helper functions to assist with managing transitions and toggling between light and dark modes.
  • Easy Installation: Simple steps to enable the Dark class variant in your tailwind.config.js file.
  • Prevent Flicker: Helper functions prevent the flicker of light mode and maintain the chosen color mode during updates.

Installation:

  1. Enable the Dark class variant in your tailwind.config.js file.
  2. Initialize Nightwind by adding a script tag to the head element of your pages.
  3. Utilize helper functions provided in ’nightwind/helper.js’ to get started easily.
  4. Use additional functions like toggle, enable, and beforeTransition to manage dark mode effectively.

Summary:

Nightwind is a useful Tailwind CSS plugin that simplifies the process of implementing and customizing dark mode in web projects. By leveraging the existing Tailwind color palette and offering customization options, Nightwind streamlines the generation of dark mode styles. The inclusion of helper functions and easy installation steps make Nightwind a valuable tool for developers looking to enhance their projects with dark mode functionality.