tailwindcss-custom-variant
v1.0.0
Published
Tailwind plugin for adding a custom variant
Downloads
4
Maintainers
Readme
tailwindcss-custom-variant
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.