Getting table/action styles to work outside a panel
Hi! I have a table in a full-page livewire component outside of a panel. The basic functionality works fine, but for example, the colors applied to buttons by default don't work, because the css file that contains them is (apparently) only loaded on a panel. However, I don't want to create another panel for this (I already have a panel at
/admin
), because the path that the panel would be accessible at already has existing routes. Is there a way to get these css classes loaded somehow, without creating a panel?
The path of the css file in question is public/css/filament/filament/app.cs
, and I'm using filament 3.1 with vite, livewire, etc.5 Replies
I think you have to create a theme. https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
use
FilamentColor::register()
in the AppServiceProvider
https://filamentphp.com/docs/3.x/support/colors#customizing-the-default-colorsI don't want to modify filament's colours, I want the classes that apply the colors to be loaded.
npm run build
you should update your content configuration in tailwind.config.js
to also scan for classes inside your projectI've done both, and tailwind does scan for classes in the project, as other filament css files (
public/css/filament/forms/forms.css
, public/css/filament/support/support.css
) are loaded and working.