Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

tailwindcss-dark-mode-plugin

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-dark-mode-plugin

Dark mode plugin for tailwind css

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

tailwindcss-dark-mode-plugin

Dark mode plugin for tailwind css

Installation

yarn add tailwindcss-dark-mode-plugin --save-dev
# or
npm install tailwindcss-dark-mode-plugin --save-dev
# or
pnpm install tailwindcss-dark-mode-plugin --save-dev

Usage Example

In your tailwind.config.js:

import plugin from "tailwindcss/plugin";
import { themeColors, themePlugin } from "tailwindcss-dark-mode-plugin";

/** @type {import('tailwindcss').Config} */
export default {
  theme: {
    colors: themeColors,
  },
  plugins: [plugin(themePlugin)],
};

Feature

  • Use css variable mode for dark night mode injection.For :root and html#id.
  • It depend on tailwindcss, all tailwindcss built-in colors have been rewritten.
  • Dark mode is out of the box as long as you use tailwindcss built-in colors. You don't need to write class like dark:bg-black.

Recommendation

  • You can configure css styles to whole document like, let it more out of the box
@layer base {
  body {
    @apply text-neutral-700;
  }
}

FAQs

Package last updated on 13 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts