How to add class into x-filament::button

Hello, I'm searching for how to add class into the component button <x-filament::button type="button" @click="">{{ __('Order') }}</x-filament::button> i tested by class="bg-white" but is not apply
5 Replies
Patrick Boivin
The class attribute should work on the button, can you see it if you inspect your element in the browser's dev tools? There's probably another class that has higher priority than bg-white
papipsycho
papipsychoOP2y ago
Thanks, actually the issue iss because is override by some other class, for instance i wanted to add px-8 py-3 but they are px-3 py-1 which is already use, there is anyway to override the attribute class for a button ?
Patrick Boivin
I think the most flexible way is to copy the Blade file into your project and customize it.
JibayMcs
JibayMcs2y ago
🤔 maybe with @class(['bg-white']) ? It work's like a charm for me. Or use the more flexible solution from pboivin
ZedoX
ZedoX2y ago
Not recommending this but you can also use important classes "!bg-white"

Did you find this page helpful?