How to add a custom id or class to an Action button?

I need to add some ids to differentiate my custom action buttons on the edit page.
Action::make('custombutton')
->id('customid')
Action::make('custombutton')
->id('customid')
doesn't work. I am getting:
Method Filament\Actions\Action::id does not exist.
Method Filament\Actions\Action::id does not exist.
How to add a custom id or class to a button?
Solution:
->extraAttributes(['class' => 'custom_class'])
->extraAttributes(['class' => 'custom_class'])
...
Jump to solution
2 Replies
Solution
toeknee
toeknee9mo ago
->extraAttributes(['class' => 'custom_class'])
->extraAttributes(['class' => 'custom_class'])
Wirkhof
WirkhofOP9mo ago
Great, working!
Want results from more Discord servers?
Add your server