Giter VIP home page Giter VIP logo

tailwind-grouping's Introduction

Tailwind Grouping

A collection of plugins to expand grouped Tailwind-like utility classes


OverviewPluginsSupported Syntax


Overview

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.

Plugins

Package Description
babel-plugin-tailwind-grouping Babel plugin and core expansion logic
vite-plugin-tailwind-grouping Vite wrapper
wmr-plugin-tailwind-grouping WMR wraper

Supported Syntax

The scope is quite limited at the moment, though I'm working on expanding.

  • babel-plugin-tailwind-grouping

    • Only supports JSX/TSX inputs, or HTML that could be valid JSX.
      • This excludes HTML documents, as <!DOCTYPE>, <style>, and <script> tags are invalid JSX
  • vite-plugin-tailwind-grouping

    • Supports JSX/TSX, HTML, and Vue SFC inputs
  • wmr-plugin-tailwind-grouping

    • Supports JSX/TSX. Input HTML is not provided to WMR plugins, so cannot transform it.

License

MIT

tailwind-grouping's People

Contributors

rschristian avatar

Stargazers

thaqldks avatar Ryan Zayne avatar HappyWood avatar Amrit Kahlon avatar Daniel Weck avatar Luke Warlow avatar  avatar

Watchers

Daniel Weck avatar  avatar

tailwind-grouping's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.