transform-to-tailwindcss weekly downloads statistics
By Simon-He95 (2 listings) · npm · Webpack plugins
🎨 Revolutionary CSS-to-TailwindCSS migration tool with surgical precision. Transform legacy stylesheets to utility-first classes instantly across Vue, React, Svelte, and Astro projects.
transform-to-tailwindcss has 141 recorded weekly downloads on npm, an increase of 386% over the past 30 days, ranking #2556 of 3,247 tracked listings.
About transform-to-tailwindcss
🎨 Transform to TailwindCSS
<img height="200" src="./assets/kv.png" alt="to tailwindcss">🚀 Effortlessly migrate legacy CSS to TailwindCSS
Automatically transform existing CSS styles into utility-first TailwindCSS classes
</div>✨ Why Choose Transform to TailwindCSS?
🎯 Performance First - Reduce bundle size with TailwindCSS utility classes 🔄 Legacy Migration - Seamlessly upgrade old projects to modern TailwindCSS ⚡ Developer Experience - Maintain design system consistency 🛠️ Framework Agnostic - Support for Vue, React, Svelte, Astro and vanilla HTML 📝 Auto Safelist - 🆕 Automatically collect generated class names, never lose any 🔐 Circular Protection - 🆕 Smart protection to prevent infinite build loops 🚀 Build Optimized - 🆕 Smart skip, only regenerate when changes occur
Want to use UnoCSS? Try transformToUnocss!
🚀 Quick Start
Global Installation
npm install -g transform-to-tailwindcss
# or
yarn global add transform-to-tailwindcss
# or
pnpm add -g transform-to-tailwindcss
🎯 CSS Preprocessor Dependencies
From v0.0.49+, install CSS preprocessors you use in your project:
# For Sass/SCSS support
npm install sass
# For Less support
npm install less less-plugin-module-resolver
# For Stylus support
npm install stylus
Why? Using
peerDependenciesensures compatibility with your project's preprocessor versions and avoids conflicts.
CLI Usage
# Transform a directory
totailwindcss playground
# Revert changes
totailwindcss playground --revert
🆕 Quick Example: Auto Safelist Generation
Transform your CSS and automatically generate a safelist for TailwindCSS in just 3 steps:
⚠️ For Tailwind CSS v3.x and below users: Run
npm run buildonce before starting development to generate the initial safelist file.
// 1. Configure your build tool
// vite.config.ts
export default defineConfig({
plugins: [
viteTransformToTailwindcss({
collectClasses: true, // 🆕 Enable auto-collection
outputPath: './safelist-classes.js',
}),
],
})
// 2. Use in your TailwindCSS config
// tailwind.config.js
const { safelistClasses } = require('./safelist-classes.js')
module.exports = {
safelist: [...safelistClasses], // 🎯 Never lose classes again!
// ... rest of your config
}
<!-- 3. Write your components normally -->
<template>
<div class="card">
<h1 class="title">
Hello World
</h1>
</div>
</template>
<style scoped>
.card {
padding: 20px;
background: #f3f4f6;
}
.title {
font-size: 24px;
color: #1f2937;
}
</style>
<!-- ✨ Auto-generated: ["p-5", "bg-gray-100", "text-2xl", "text-gray-800"] -->
🌈 Usage
<details> <summary>Vite</summary>// vite.config.ts
import { vitePluginTransformTotailwindcss } from 'transform-to-tailwindcss'
export default defineConfig({
plugins: [vitePluginTransformTotailwindcss(/* options */)],
})
</details>
<br>
<details>
<summary>Rollup</summary>
// rollup.config.js
import { resolve } from 'node:path'
import { rollupTransformTotailwindcss } from 'transform-to-tailwindcss'
export default {
plugins: [rollupTransformTotailwindcss(/* options */)],
}
</details>
<br>
<details>
<summary>Webpack</summary>
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('transform-to-tailwindcss').webpackTransformTotailwindcss({
/* options */
}),
],
}
</details>
<br>
<details>
<summary>Vue CLI</summary>
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('transform-to-tailwindcss').webpackTransformTotailwindcss({
/* options */
}),
],
},
}
</details>
<br>
<details>
<summary>Esbuild</summary>
// esbuild.config.js
import { build } from 'esbuild'
import { esbuildTransformTotailwindcss } from 'transform-to-tailwindcss'
build({
plugins: [esbuildTransformTotailwindcss(/* options */)],
})
</details>
🔧 Configuration Options
<div align="center">| Option | Type | Default | Description |
|---|---|---|---|
🐛 debug | boolean | false | Enable detailed transformation logs |
📐 isRem | boolean | false | Convert px units to rem |
🎯 include | FilterPattern | - | Files to process |
🚫 exclude | FilterPattern | - | Files to ignore |
📝 collectClasses | boolean | false | New Auto-collect generated classes |
📂 outputPath | string | './safelist-classes.js' | New Output path for collected classes |
⚡ skipIfNoChanges | boolean | true | New Skip generation if no changes |
Description from the npm listing.
- transform-to-tailwindcss
- tailwindcss
- css-transform
- utility-first
- css-migration
- vue
- react
- svelte
- astro
- vite-plugin
- webpack-plugin
- rollup-plugin
- esbuild-plugin
- css-preprocessor
- sass
- less
- stylus
- performance
- optimization
- developer-tools
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Webpack plugins plugins
All 20 transform-to-tailwindcss alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/transform-to-tailwindcss. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.