A deprecated Prettier plugin for sorting Tailwind CSS classes in NativeWind projects. Version 0.2.3 is the final release. This fork added support for custom props, function calls, and tagged template literals beyond what upstream prettier-plugin-tailwindcss offered. However, as of prettier-plugin-tailwindcss v0.3.0 and later, all these features are natively supported, making this plugin obsolete. Users should migrate to the official plugin. No further updates are planned.
npm install prettier-plugin-nativewindVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin with custom props and function calls, and demonstrates class sorting.
Replace prettier-plugin-nativewind with prettier-plugin-tailwindcss in devDependencies and remove any custom configuration specific to this fork (e.g., tailwindCustomProps).
Only install peer deps that are actually required by your project. The plugin works without them if you don't use those features.
Use exact string matches unless you specifically need regex. For example, '^[a-z]+ClassName$' matches any prop ending with 'ClassName'.
Update config to use the new option names if upgrading from v0.1.x.
Run npm install prettier-plugin-nativewind --save-dev or yarn add -D prettier-plugin-nativewind.
Ensure the option is an array, e.g., tailwindCustomProps: ['className'].
Ensure you have a tailwind.config.js or tailwind.config.ts in your project root, or configure the tailwindConfig option in Prettier config.