Can't use Tailwind-classes anymore after update to Filament V4
Hey - after following the upgrade-guide from Filament 3 to Filament 4 it does not seem to recognize tailwind-classes anymore.
I'm using a view for my resource-column-label which does this:
I've ran
vite build
multiple times now, checked my app.css (it does @import 'tailwindcss';
and checked my vite.config.js which looks like this:
But whatever I try - the display: flex
is not applied to the row. I only get the display: block
from the attached screen shoot. When I load my app.css within the browser, it starts with
So tailwind seems to be there but not applied. I am out of my knowledge right now - anyone had this before and is able to help? π
Solution:Jump to solution
did you run the npx upgrade? You are right looking at V4, but you need to include your blades in the v4 classes see:
https://filamentphp.com/docs/4.x/styling/overview#using-tailwind-css-classes-in-your-blade-views-or-php-files
So you should have a path to your custom view folder....
6 Replies
and what about your tailwind config which tells it where to look for it's classes?
according to this, that ain't needed anymore. Or did I get this wrong?

Solution
did you run the npx upgrade? You are right looking at V4, but you need to include your blades in the v4 classes see:
https://filamentphp.com/docs/4.x/styling/overview#using-tailwind-css-classes-in-your-blade-views-or-php-files
So you should have a path to your custom view folder.
That was it! Thank you @toeknee! π For anyone seeing this: You can add more view-directories by using
@source ../../../resources/views/add_your_subfolder/**/*
No problem, very welcome!