Blade Components

I just started out working on blade components under core concepts in filament 3. My problem is that I'm trying to have a flex in row direction but it doesnt seem to work <x-filament-panels::page class="flex flex-col grid"> <x-filament::section class="w-1/4"> <x-slot name="heading"> Message List </x-slot> Content </x-filament::section> <x-filament::section class="w-3/4"> <x-slot name="heading"> Message Body </x-slot> Content </x-filament::section> </x-filament-panels::page>
Solution:
Got it working, used a custom layout instead of using <x-filament-panels::page>
Jump to solution
14 Replies
LeandroFerreira
LeandroFerreira3mo ago
If you are using Tailwind CSS classes that are not already used in Blade files, you should create a custom theme https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
Desmond Njuguna
Desmond Njuguna3mo ago
I am already using a custom theme $panel->viteTheme('resources/css/filament/admin/theme.css');
LeandroFerreira
LeandroFerreira3mo ago
did you update your content configuration in tailwind.config.js to also scan for classes inside this directory?
Desmond Njuguna
Desmond Njuguna3mo ago
Yes i have
LeandroFerreira
LeandroFerreira3mo ago
could you share a screenshot with the result please?
Desmond Njuguna
Desmond Njuguna3mo ago
Here
No description
LeandroFerreira
LeandroFerreira3mo ago
What should it be? I think this is showing exactly your code...
Desmond Njuguna
Desmond Njuguna3mo ago
Sorry, the flex direction should be row but the sections are still as shown in the screenshot
LeandroFerreira
LeandroFerreira3mo ago
There doesn’t seem to be a Filament issue, but I believe that configuring a custom theme will allow the new Tailwind classes to be applied. I recommend reviewing your code..
Desmond Njuguna
Desmond Njuguna3mo ago
Let me do that
awcodes
awcodes3mo ago
Also, flex and grid don’t work together. 🙂
Desmond Njuguna
Desmond Njuguna3mo ago
This works, but had to do it in dev tools
No description
Solution
Desmond Njuguna
Desmond Njuguna3mo ago
Got it working, used a custom layout instead of using <x-filament-panels::page>
Dennis Koch
Dennis Koch3mo ago
That component contains way more than one element. So your classes were applied to the wrong element. They get applied to the root element but you expected them to be applied to the element closest to the slot.