Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Preset Tailwindcss

Preset Tailwindcss Laravel Package

statamic/preset-tailwindcss

A Statamic preset that quickly adds Tailwind CSS to a new Statamic site, providing configuration, a CSS entry point, and build setup for utility-first styling. It streamlines front-end setup by wiring Tailwind into the asset pipeline so developers can start using utility classes right away.

View on GitHub
Deep Wiki
Context7

Statamic frontend preset for Tailwind CSS

Frequently asked questions about Preset Tailwindcss
What is statamic/preset-tailwindcss and what is it used for?
It is a Statamic 2 frontend preset that scaffolds Tailwind CSS into a new site. It provides a tailwind.config.js, a package.json and Laravel Mix build definition, a starter CSS entry point, and Antlers layout and partial files. The preset command copies those files into a site theme so developers can start using utility classes. It is a one-time scaffolding reference, not a runtime Laravel package.
Is statamic/preset-tailwindcss compatible with current Laravel and Statamic versions?
No. It targets Statamic 2 and the Laravel Mix era, so it does not fit Statamic 3 or later, which uses Vite for frontend assets. Composer resolution against a modern Laravel and Statamic stack will likely fail or pull in stale constraints. It should not be installed in a current Laravel application.
How do I install statamic/preset-tailwindcss?
The original workflow was for a legacy Statamic 2 project: require the package with Composer and run the php please preset command to copy its files into your theme. Do not install it into a Statamic 3+ or modern Laravel app. If you only need the configuration as a reference, copy tailwind.config.js, the Mix setup, and the Antlers files into an isolated branch instead of adding the package as a dependency.
Which Tailwind CSS version does this Statamic preset target?
It targets a pre-1.0 or 1.x Tailwind release from the Statamic 2 era. Its PostCSS directives and purge configuration predate modern Tailwind JIT and content scanning. It is not compatible with Tailwind CSS 2, 3, or 4 without a full rebuild of the build pipeline and configuration.
Is statamic/preset-tailwindcss still maintained?
No. The repository has been archived since 2019, with the last release on 2019-05-09, 22 stars, and zero dependents. There are no security patches, compatibility fixes, or community validation coming from upstream. MIT licensing allows a fork, but your team would own all maintenance and remediation.
Can I use statamic/preset-tailwindcss with Vite instead of Laravel Mix?
Not directly. The preset ships a Laravel Mix and webpack build definition, and its CSS entry and PostCSS setup are built for that pipeline. To use Vite, extract the Tailwind config and Antlers layout conventions, then rebuild the asset pipeline with Vite, @tailwindcss/vite, and a manifest. Treat the preset as a reference, not as an installable Vite integration.
What files and configuration does the preset add to a Statamic theme?
It adds a tailwind.config.js, a package.json and Laravel Mix build definition, a starter CSS entry point, and a small set of Antlers layouts and partials. A php please preset command copies these files into the site theme. There is no service provider or application-facing PHP API. The output is frontend scaffolding, CSS, templates, and Node build configuration.
Why do Tailwind classes like bg-{{ color }}-500 get removed in production?
The preset's purge and content configuration predates modern Tailwind content scanning. Dynamically composed class names such as bg-{{ color }}-500 are not visible as complete strings at build time, so they can be stripped silently. That creates visual regressions rather than build errors. You would need safelisting or full class names, but rebuilding on a current Tailwind setup is the safer fix.
What are the alternatives to statamic/preset-tailwindcss?
Use a current official Statamic starter kit with a maintained Tailwind setup, or create Tailwind and Vite configuration manually in your project. Both approaches give you supported tooling, modern content scanning, and clear upgrade paths. Extracting the old preset's files is only reasonable as a one-time reference for legacy Statamic 2 work. Do not treat the archived preset as a long-term dependency.
Is statamic/preset-tailwindcss safe for production use?
No. It is archived, depends on a legacy Mix and Tailwind toolchain, and can pull in unmaintained transitive Node dependencies that must clear security review. Do not add it to a production dependency graph. If you must validate a legacy site, freeze the current build, run visual regression and accessibility checks, and test that generated CSS includes the utility classes your templates rely on before planning migration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource