tw-migrate

Preview and migrate React, Vue, and HTML CSS to Tailwind utilities
2,220 7
Install
npm install tw-migrate
Latest Version:0.8.2
Older releases:3
License:MIT
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: jong-kyung

tw-migrate

Migrate static React/Next.js, Vue 3 SFC, and HTML stylesheet usage to Tailwind CSS v4 utilities. Supports CSS, SCSS, Sass, Less, and CSS Modules.

Requires Node.js 22.23.4+ and Tailwind CSS v4 configured in your project with a CSS entry such as @import "tailwindcss";. For Sass or Less, install the compiler in the project you are migrating.

Usage

Run from the package you want to migrate:

npx tw-migrate --dry-run                  # Preview changes
npx tw-migrate                            # Apply changes
npx tw-migrate path/to/Button.module.scss # Migrate one stylesheet
npx tw-migrate --workspaces               # Migrate all packages
npx tw-migrate --help                     # See all options

pnpm dlx tw-migrate and yarn dlx tw-migrate accept the same arguments.

The CLI writes files by default. Review the preview before applying. Unsupported or ambiguous rules stay in place with warnings. Use --tailwind-css path/to/globals.css to select an entry when discovery is ambiguous.

More

Related Packages

tailwind-config-viewer

View your Tailwind CSS config file...visually!

19,524,150 2,211
eslint-plugin-tailwind-canonical-classes

ESLint plugin to enforce canonical Tailwind CSS class names using Tailwind CSS v...

1,275,346 27
@lunawerx/normwind

Normalize Tailwinds: Tailwind shorthand audit, canonicalization checks, and safe...

4,830 11
csszyx

Universal CSS-in-JS for Tailwind CSS with WASM core

10,845 0
@bouquet-ui/design

The headless design system for Bouquet UI built with Jade Garden and Tailwind CS...

2,601 0

Version History

Version Released Vue License
0.8.2 catalog: MIT
0.8.1 catalog: MIT
0.8.0 catalog: MIT
0.7.1 catalog: MIT
0.7.0 catalog: MIT
Pre-releases (2)
Version Released License
0.1.0-alpha.1 MIT
0.1.0-alpha.0 MIT