Babel plugin to expand grouped TailwindCSS-like utility classes
MIT License
The basis gist of these plugins is to convert syntax like class="text(blue-500 2xl)"
into class="text-blue-500 text-2xl"
. This alleviates a major pain point in the usage of Tailwind, as it can often become extremely repetative and verbose.
This plugin facilitates directive (text(blue-500 2xl)
), variant (hover:(text-blue-500 text-2xl)
), and mixed (hover:(text(blue-500 2xl))
) grouping.
This syntax comes from twind and we use Twind to process your class lists into the expanded form.
Package | Description |
---|---|
babel-plugin-tailwind-grouping | Babel plugin and core expansion logic |
vite-plugin-tailwind-grouping | Vite wrapper |
wmr-plugin-tailwind-grouping | WMR wraper |
The scope is quite limited at the moment, though I'm working on expanding.
babel-plugin-tailwind-grouping
<!DOCTYPE>
, <style>
, and <script>
tags are invalid JSXvite-plugin-tailwind-grouping
wmr-plugin-tailwind-grouping