Xwind screenshot

Xwind

Author Avatar Theme by Arthie
Updated: 30 Mar 2021
371 Stars

Tailwind CSS as a templating language in JS and CSS-in-JS

Overview:

This repository aims to solve the challenges that arise when using Tailwind with CSS-in-JS libraries. It includes a collection of packages that simplify the integration of Tailwind with CSS-in-JS libraries. The main goal is to address issues such as the need to use PurgeCSS for minimal CSS files, lack of warnings for misspelled or non-existent classes, long and hard-to-read inline classes, and the requirement to specify variants for utility classes in the tailwind.config.js file.

Features:

  • Solves Common Tailwind and CSS-in-JS Issues: This repository aims to solve problems commonly encountered when using Tailwind with CSS-in-JS libraries.
  • Automatically Compatible with Latest Tailwind Version: The packages included in this repository are automatically compatible with the latest version of Tailwind (version 2.X.X).
  • New Syntax for Applying Variants to Multiple Utility Classes: The repository introduces a new syntax that allows for applying variants to multiple utility classes in a more concise way.
  • React to Changes in tailwind.config.js: The packages included in this repository react to changes made in the tailwind.config.js file.
  • Great Developer Experience: The repository provides a great developer experience with a VS Code extension and a typescript-xwind-plugin.
  • No Runtime Impact: All transformations happen during build time, ensuring no runtime impact.
  • Support for CSS-in-JS Libraries: The repository includes plugins to support various CSS-in-JS library syntaxes, making it compatible with your favorite CSS-in-JS library.
  • Supports All Tailwind Features: The repository supports all Tailwind features, including utility and component classes, variant utility classes, custom classes, and tailwind.config.js customization.

Installation:

To install this theme, follow the steps below:

  1. Clone the repository to your local machine:
git clone [repository URL]
  1. Install the necessary dependencies:
npm install
  1. Configure the tailwind.config.js file according to your preferences.
  2. Use the provided plugins or packages to integrate with your CSS-in-JS libraries or tools.

Summary:

This repository aims to simplify the integration of Tailwind with CSS-in-JS libraries by solving common challenges faced by developers. It provides various features and packages that offer a better developer experience, compatibility with the latest Tailwind version, and support for different CSS-in-JS library syntaxes. By following the installation guide and utilizing the provided packages, developers can enhance their workflow and leverage the benefits of both Tailwind and CSS-in-JS libraries.