Trigger button
Overview
All actions have a trigger button. When the user clicks on it, the action is executed - a modal will open, a closure function will be executed, or they will be redirected to a URL.
This page is about customizing the look of that trigger button.
Choosing a trigger style
Out of the box, action triggers have 3 styles - "button", "link", and "icon button".
"Button" triggers have a background color, label, and optionally an icon. Usually, this is the default button style, but you can use it manually with the button()
method:
Action::make('edit')
->button()
"Link" triggers have no background color. They must have a label and optionally an icon. They look like a link that you might find embedded within text. You can switch to that style with the link()
method:
Action::make('edit')
->link()
"Icon button" triggers are circular buttons with an icon and no label. You can switch to that style with the iconButton()
method:
Action::make('edit')
->icon('heroicon-m-pencil-square')
->iconButton()