Add tailwind v4 support to filament #15869
Replies: 3 comments 2 replies
-
Filament V4 will support Tailwind V4 |
Beta Was this translation helpful? Give feedback.
-
Status UpdateI’ve mostly figured it out. Theme PartFortunately, updating the theme for v4 won’t require much work. The steps are:
@theme inline {
--color-custom-100: rgb(var(--c-100));
/* Define all other color variables here */
}
@import 'tailwindcss';
@import './theme.css' @layer(theme);
@source '../../app/Filament/**/*.php';
@source '../../resources/views/filament/**/*.blade.php';
@source '../../vendor/filament/**/*.blade.php';
/* Include Laravel's default styles if using the starter kit */ Classes PartFor the second step, we just need to update all Tailwind CSS classes that were removed or changed in v3. Final StepThe last part will be updating the documentation and installation script for new projects. I can handle all of this. I just want to know if Dan would be open to merging the PR if I submit it. |
Beta Was this translation helpful? Give feedback.
-
Hey @sohailahmad07, not Dan, but like @leandrocfe mentioned, we've already got Tailwind 4 working in the Filament v4 branch that we're actively developing, so this is definitely a top priority for us. However (and Dan & team chime in if I'm incorrect here), the migration from Tailwind 3 to 4 would be considered a breaking change, which we only try to make on major version releases (i.e. Filament v3 -> v4). Because of that, and because we've already implemented these changes for v4, I imagine that we wouldn't want to add Tailwind 4 to the Filament v3 branch. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
HI
I have been messing around with Filament to see if I can add support for tailwind v4.
Most of the things are easy; it is just boring work like removing deprecated classes and adding a new one
The one thing that i am tripping over is how to make the whole theme system work i got the color to work, but it has to be defined in CSS and not
App service Provider.
So in CSS you would define the color like so
And then in your view, you can use it like so
so can anyone tell me how the whole theme system works and if there is a way to convert it to tailwind v4
Beta Was this translation helpful? Give feedback.
All reactions