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
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
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 ?
I think the most flexible way is to copy the Blade file into your project and customize it.
🤔 maybe with
@class(['bg-white'])
? It work's like a charm for me.
Or use the more flexible solution from pboivinNot recommending this but you can also use important classes "!bg-white"