First, you need to have TailwindCSS already setup with Laravel. Since TailwindCSS requires classes to be present in whatever file you have specified inside your content array in tailwindcss.config.js, during your development you might experience missing styles due to the usage of variables inside your *.blade.php files (for example). Consider the following case, you have few buttons that look exactly the same except for their background color: Default What changes in each button is the css utility classes applied for background color.

And we can use the Default button in our views as follows: Default
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners