Socket
Book a DemoInstallSign in
Socket

tailwindcss-custom-variant

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-custom-variant

Tailwind plugin for adding a custom variant

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

tailwindcss-custom-variant test

Tailwind plugin for adding a custom variant similar to the built-in dark variant

Note that it only works in JIT mode.

Install

npm install --save-dev tailwindcss-custom-variant

Usage

In tailwind.config.js:

const customVariant = require('tailwindcss-custom-variant');

module.exports = {
	mode: 'jit',
	plugins: [customVariant('hawkins')]
};

In your HTML:

<div class="hawkins:bg-black hawkins:hover:bg-white"></div>

API

customVariant(name)

name

Type: string

Custom variant name.

Keywords

tailwind

FAQs

Package last updated on 24 Oct 2021

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