Weave Code
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
Tailwind Bundle

Tailwind Bundle Laravel Package

symfonycasts/tailwind-bundle

Integrate Tailwind CSS into Symfony with zero fuss. This bundle adds an easy Tailwind build pipeline (CLI support, watch/build commands), sensible defaults, and smooth asset integration so you can ship modern utility-first styling in Symfony apps quickly.

View on GitHub
Deep Wiki
Context7

Delightful Tailwind Support for Symfony + AssetMapper

Frequently asked questions about Tailwind Bundle
Can I use this bundle in a pure Laravel project without Symfony components?
This bundle is designed for Symfony or Symfony-integrated projects (like Lumen). For pure Laravel, consider alternatives like `laravel-mix` or `vite-plugin-tailwind`. However, you can still use the bundle’s CLI commands (e.g., `tailwind:build`) for Tailwind builds while keeping Laravel’s asset pipeline separate.
How do I configure Tailwind’s content paths for Laravel Blade files?
Add your Blade file paths to `tailwind.config.js` manually, e.g., `content: ['./resources/views/**/*.blade.php']`. The bundle doesn’t auto-detect Laravel Blade files, so ensure all templates are explicitly included. Use `./**/*.blade.php` for broader coverage if needed.
Will this bundle work with Laravel’s Vite or Webpack (laravel-mix)?
No, this bundle replaces Laravel’s asset pipeline with Symfony’s AssetMapper. For hybrid setups, you’d need to manually bridge the two (e.g., use Vite for JS and the bundle for Tailwind CSS). Alternatively, stick to one system—either Laravel’s mix/Vite or Symfony’s AssetMapper.
Does this bundle support Laravel 10+? If so, how do I integrate it?
This bundle is Symfony-focused, but you can use it alongside Laravel via the [Laravel Symfony Bridge](https://github.com/driesvints/laravel-symfony-bridge). For Laravel 10, ensure your `public_path()` aligns with Symfony’s asset paths. The bundle’s CLI commands (e.g., `tailwind:watch`) will work independently of Laravel’s asset pipeline.
How do I avoid Node.js entirely with this bundle?
This bundle eliminates Node.js by downloading Tailwind’s binaries on-demand. No Node installation is required. The bundle handles Tailwind’s CLI tools internally, so your CI/CD or local dev environment won’t need Node.js. Just ensure your PHP environment meets the bundle’s requirements (PHP 8.1+).
What’s the impact on CI/CD build times?
The bundle downloads Tailwind binaries during the first build, which can slow down CI if not cached. Use Docker layer caching or pre-download the binary in your CI setup. Set `strict_mode: false` in tests to skip builds. For GitHub Actions, cache the `~/.cache/symfonycasts/tailwind` directory between runs.
Can I use this bundle with Laravel’s @asset directive or mix-manifest.json?
No, this bundle uses Symfony’s `asset()` helper (e.g., `{{ asset('build/app.css') }}`). For Laravel, you’d need to either: 1) Replace Laravel’s asset helpers with Symfony’s, or 2) Use a custom middleware to map Laravel’s `@asset` to Symfony’s paths. The bundle doesn’t support `mix-manifest.json` natively.
How do I customize Tailwind’s config (e.g., plugins, variants) in this bundle?
Use the `custom_config_file` option in `config/packages/symfonycasts_tailwind.yaml` to point to your existing `tailwind.config.js`. The bundle merges its defaults with your config, so you can override paths, plugins, or variants as needed. Example: `custom_config_file: '%kernel.project_dir%/tailwind.config.js'`.
Is there a way to use this bundle for Tailwind builds only, without adopting AssetMapper?
Yes! You can use the bundle’s CLI commands (`tailwind:build`, `tailwind:watch`) independently of AssetMapper. Install the bundle, configure `tailwind.config.js`, and run commands manually. This works well for projects where you want Tailwind’s utility classes but keep Laravel’s existing asset pipeline (e.g., Vite).
What are the alternatives to this bundle for Laravel + Tailwind?
For Laravel, consider `laravel-mix` with `postcss` or `vite-plugin-tailwind` for Node.js-based setups. If you’re using Symfony components (e.g., API Platform), this bundle is ideal. For Lumen, it integrates natively. For pure Laravel, `tailwindcss` CLI + Laravel’s asset helpers (or Vite) are simpler alternatives.
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.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin