
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
tailwindcss-custom-groups
Advanced tools
[!IMPORTANT] As of version 3.2, Tailwind CSS now offers named groups natively.
Out of the box, Tailwind CSS comes with a group-
utility that's used for styling elements depending on the state of their parents.
The plugin right here lets you generate custom group utilities in the form of group-*-
, where *
represents an arbitray name.
In most scenarios, the default group-
utility works just fine. As your app grows in complexity, however, you might find yourself looking for solutions to needs such as:
group-
utilitiesgroup-
usergroup-
labels if many are used in the same componentIf so, this plugin will help you.
First, install the plugin:
npm install tailwindcss-custom-groups --save-dev
Then add the plugin to your Tailwind CSS config file:
theme: {
customGroups: {
// For example, `row` results in `group-row-`
names: ['row']
}
},
plugins: [
require('tailwindcss-custom-groups')
]
To avoid too much CSS being generated, every new group-*-
utility only supports a small list of pseudo-classes.
If you'd like to generate different ones, you can replace the defaults with customGroups.variants
:
variants: {
'odd': 'nth-child(odd)'
}
The package is based on this comment by @maelquerre, with various additions by @leo.
FAQs
Generate custom `group-` utilities for TailwindCSS
The npm package tailwindcss-custom-groups receives a total of 207 weekly downloads. As such, tailwindcss-custom-groups popularity was classified as not popular.
We found that tailwindcss-custom-groups demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.