All Projects β†’ ngneat β†’ Tailwind

ngneat / Tailwind

Licence: mit
πŸ”₯ A schematic that adds Tailwind CSS to Angular applications

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Tailwind

Schematics Utilities
πŸ› οΈ Useful exported utilities for working with Schematics
Stars: ✭ 73 (-81.66%)
Mutual labels:  schematics, utils
Tailwindcss Theming
Tailwind CSS plugin for client-side theming using CSS variables, with dark mode support
Stars: ✭ 349 (-12.31%)
Mutual labels:  tailwindcss
Laravel Form Components
A set of Blade components to rapidly build forms with Tailwind CSS (v1.0 and v2.0) and Bootstrap 4. Supports validation, model binding, default values, translations, Laravel Livewire, includes default vendor styling and fully customizable!
Stars: ✭ 295 (-25.88%)
Mutual labels:  tailwindcss
Gridsome Portfolio Starter
A simple portfolio theme for Gridsome powered by Tailwind CSS v1
Stars: ✭ 329 (-17.34%)
Mutual labels:  tailwindcss
Tailwindcss Classnames
TypeScript support for TailwindCSS
Stars: ✭ 305 (-23.37%)
Mutual labels:  tailwindcss
Typed.tw
Brings types to TailwindCSS via TypeScript.
Stars: ✭ 340 (-14.57%)
Mutual labels:  tailwindcss
Sapper Ecommerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, 1 command deploy to production, Open Source, MIT license. Join us as contributor ([emailΒ protected])
Stars: ✭ 289 (-27.39%)
Mutual labels:  tailwindcss
Windmill React Ui
🧩 The component library for fast and accessible development of gorgeous interfaces.
Stars: ✭ 373 (-6.28%)
Mutual labels:  tailwindcss
React Element To Jsx String
Turn a ReactElement into the corresponding JSX string
Stars: ✭ 349 (-12.31%)
Mutual labels:  utils
Superutils
The utils Project
Stars: ✭ 325 (-18.34%)
Mutual labels:  utils
Tall Forms
Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.
Stars: ✭ 321 (-19.35%)
Mutual labels:  tailwindcss
Androidutilcodektx
Kotlin Android Util Code
Stars: ✭ 309 (-22.36%)
Mutual labels:  utils
Tailwindcolorshades
Color shades generator for TailwindCSS - https://javisperez.github.io/tailwindcolorshades
Stars: ✭ 345 (-13.32%)
Mutual labels:  tailwindcss
Autoremove Torrents
Automatically remove torrents according to your strategies.
Stars: ✭ 298 (-25.13%)
Mutual labels:  utils
Tailwind Starter Kit
Tailwind Starter Kit a beautiful extension for TailwindCSS, Free and Open Source
Stars: ✭ 4,434 (+1014.07%)
Mutual labels:  tailwindcss
Windmill Dashboard React
❄ A multi theme, completely accessible, ready for production dashboard.
Stars: ✭ 283 (-28.89%)
Mutual labels:  tailwindcss
Babel Plugin Tailwind Components
Use Tailwind with any CSS-in-JS library
Stars: ✭ 320 (-19.6%)
Mutual labels:  tailwindcss
Utils Everywhere
ζ•΄η†εΉΆζ”Άι›†ε„η§εΈΈη”¨ηš„θ¦†η›–ι’εΉΏηš„ε·₯ε…·η±»
Stars: ✭ 329 (-17.34%)
Mutual labels:  utils
Twin.macro
πŸ¦Ήβ€β™‚οΈ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, stitches and goober) at build time.
Stars: ✭ 5,137 (+1190.7%)
Mutual labels:  tailwindcss
Framework
HTML email development framework.
Stars: ✭ 359 (-9.8%)
Mutual labels:  tailwindcss

Angular Tailwind CSS Schematics

This schematic will add Tailwind CSS to your Angular application.

Angular Tailwind CSS Schematics

Versions

@ngneat/tailwind AngularCLI
v6.x.x >= v11.1.x
v5.2.5 < v11.1.x

The main difference is Angular CLI v11.1+ uses PostCSS 8 already so we remove that from our dependencies list. To use this schematics at specific version, please use this syntax: ng add @ngneat/[email protected] or npm i -D @ngneat/[email protected]

Usage

ng add @ngneat/tailwind

Usage with Nx

In Nx, you can either use AngularCLI or NxCLI. If you setup your Nx Workspace to use AngularCLI, the usage is the same as above. If you setup your Nx Workspace with NxCLI, follow the steps:

Install @ngneat/tailwind first:

npm i -D @ngneat/tailwind tailwindcss postcss
yarn add -D @ngneat/tailwind tailwindcss postcss

then execute the schematics:

nx generate @ngneat/tailwind:nx-setup

Manual steps

If your projects are already using a custom Webpack builder with a custom webpack.config, follow these steps to add TailwindCSS to your project

  • npm i -D @ngneat/tailwind tailwindcss (or yarn add -D @ngneat/tailwind tailwindcss)
  • Import addTailwindPlugin from @ngneat/tailwind in your webpack.config
  • Import your TailwindCSS config in your webpack.config
  • Before you return or modify the original Webpack config, call addTailwindPlugin with the following parameters:
    • webpackConfig: the Webpack config
    • tailwindConfig: the TailwindCSS config that you import
    • patchComponentsStyles?: this flag will enable using TailwindCSS directives in components' stylesheets. Default to false because turning it on might impact your build time
// example
const { addTailwindPlugin } = require('@ngneat/tailwind');
const tailwindConfig = require('relative/path/to/tailwind.config');

module.exports = (config) => {
  addTailwindPlugin({
    webpackConfig: config,
    tailwindConfig,
    patchComponentsStyles: true
  });
  return config;
}

Angular Material

If you plan to use @ngneat/tailwind with @angular/material, please make sure that you setup @angular/material before @ngneat/tailwind because @angular/material:ng-add schematics will error out if it detects a custom Webpack in your angular.json.

Purge

@ngneat/tailwind uses built-in purge functionality by tailwindcss (under the hood, it is postcss-purgecss). By default, @ngneat/tailwind sets the content to any HTML and any TS files in the project.

This behavior can be modified as the consumers see fit.

CSS Preprocessors

If you're using CSS Preprocessors (SASS/SCSS, LESS, Stylus) in your application, please check out TailwindCSS's Using with Preprocessors guide

Contributing

  • Fork this repo and clone the fork on your machine.
  • Run npm install to install all the dependencies
  • Start working on changes

Structure

_apps
 |__tailwind-e2e (e2e tests)
_libs
 |__tailwind
    |__src
       |__schematics
          |__ng-add (AngularCLI schematics)
          |__nx-setup (NxCLI schematics)
          |__files (files template to be generated)
          |__specs (unit tests)
          |__schema.d.ts (interface)
       |__constants (constants used in the project)
       |__utils (utilities functions)
       |__collection.json (schematics configuration)
       |__package.json (package.json of @ngneat/tailwind which will be published to npm)

Commit

  • Run git add . to stage your changes
  • Run npm run commit to start Conventional Commit flow

Commit Hooks

pre-commit will execute npm run lint and pretty-quick to lint and reformat.pre-commit does not run Unit Tests because Unit Tests will be ran in Github Actions. Feel free to run the Unit Tests with npm run test to test your changes

E2E Tests

Please run npm run e2e to run E2E tests before pushing

Updating README

README is in two places at the moment: root and libs/tailwind/README.md. The one in root is the one displayed on Github while the one in libs/tailwind is being used on npm. When you make changes to README, make sure to update both.

A script can be created to automating this.

PR

When everything passes and looks good, make a PR. Thanks for your contribution.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Chau Tran

πŸ’¬ πŸ’» πŸ“– πŸ€” πŸ‘€

Netanel Basal

πŸ’» πŸ€”

Santosh Yadav

πŸ€” πŸ§‘β€πŸ«

BK

πŸ’» πŸ€”

beeman

πŸ€” πŸ§‘β€πŸ« πŸ’»

Vlad Tansky

πŸ’»

Abhinav Dinesh C

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].