Introduction
You may group actions together into a dropdown menu by using anActionGroup object. Groups may contain many actions, or other groups:
Customizing the group trigger style
The button which opens the dropdown may be customized in the same way as a normal action. All the methods available for trigger buttons may be used to customize the group trigger button:Using a grouped button design
Instead of a dropdown, an action group can render itself as a group of buttons. This design works with and without button labels. To use this feature, use thebuttonGroup() method:
Setting the placement of the dropdown
The dropdown may be positioned relative to the trigger button by using thedropdownPlacement() method:
The dropdownPlacement() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.
dropdownPlacement() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.Learn more about utility injection.
Action group
$group
Filament\Actions\ActionGroup
The current action group instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current action group, if one is attached.
Mounted actions
$mountedActions
array<Filament\Actions\Action>
The array of actions that are currently mounted in the Livewire component. This is useful for accessing data from parent actions.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current action group, if one is attached.
Schema
$schema
Filament\Schemas\Schema
[Action groups in schemas only] The schema object that this action group belongs to.
Schema component
$schemaComponent
Filament\Schemas\Components\Component
[Action groups in schemas only] The schema component that this action group belongs to.
Schema component state
$schemaComponentState
mixed
[Action groups in schemas only] The current value of the schema component.
Schema get function
$schemaGet
Filament\Schemas\Components\Utilities\Get
[Action groups in schemas only] A function for retrieving values from the schema data. Validation is not run on form fields.
Schema operation
$schemaOperation
string
[Action groups in schemas only] The current operation being performed by the schema. Usually
create, edit, or view.Schema state
$schemaState
mixed
[Action groups in schemas only] The current value of the schema that this action belongs to, like the current repeater item.
Table
$table
Filament\Tables\Table
[Action groups in tables only] The table object that this action group belongs to.
dropdownAutoPlacement() method:
Adding dividers between actions
You may add dividers between groups of actions by using nestedActionGroup objects:
dropdown(false) method puts the actions inside the parent dropdown, instead of a new nested dropdown.
The dropdown() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.
dropdown() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.Learn more about utility injection.
Action group
$group
Filament\Actions\ActionGroup
The current action group instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current action group, if one is attached.
Mounted actions
$mountedActions
array<Filament\Actions\Action>
The array of actions that are currently mounted in the Livewire component. This is useful for accessing data from parent actions.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current action group, if one is attached.
Schema
$schema
Filament\Schemas\Schema
[Action groups in schemas only] The schema object that this action group belongs to.
Schema component
$schemaComponent
Filament\Schemas\Components\Component
[Action groups in schemas only] The schema component that this action group belongs to.
Schema component state
$schemaComponentState
mixed
[Action groups in schemas only] The current value of the schema component.
Schema get function
$schemaGet
Filament\Schemas\Components\Utilities\Get
[Action groups in schemas only] A function for retrieving values from the schema data. Validation is not run on form fields.
Schema operation
$schemaOperation
string
[Action groups in schemas only] The current operation being performed by the schema. Usually
create, edit, or view.Schema state
$schemaState
mixed
[Action groups in schemas only] The current value of the schema that this action belongs to, like the current repeater item.
Table
$table
Filament\Tables\Table
[Action groups in tables only] The table object that this action group belongs to.
Setting the width of the dropdown
The dropdown may be set to a width by using thedropdownWidth() method. Options correspond to Tailwind’s max-width scale. The options are ExtraSmall, Small, Medium, Large, ExtraLarge, TwoExtraLarge, ThreeExtraLarge, FourExtraLarge, FiveExtraLarge, SixExtraLarge and SevenExtraLarge:
The dropdownWidth() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.
dropdownWidth() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.Learn more about utility injection.
Action group
$group
Filament\Actions\ActionGroup
The current action group instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current action group, if one is attached.
Mounted actions
$mountedActions
array<Filament\Actions\Action>
The array of actions that are currently mounted in the Livewire component. This is useful for accessing data from parent actions.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current action group, if one is attached.
Schema
$schema
Filament\Schemas\Schema
[Action groups in schemas only] The schema object that this action group belongs to.
Schema component
$schemaComponent
Filament\Schemas\Components\Component
[Action groups in schemas only] The schema component that this action group belongs to.
Schema component state
$schemaComponentState
mixed
[Action groups in schemas only] The current value of the schema component.
Schema get function
$schemaGet
Filament\Schemas\Components\Utilities\Get
[Action groups in schemas only] A function for retrieving values from the schema data. Validation is not run on form fields.
Schema operation
$schemaOperation
string
[Action groups in schemas only] The current operation being performed by the schema. Usually
create, edit, or view.Schema state
$schemaState
mixed
[Action groups in schemas only] The current value of the schema that this action belongs to, like the current repeater item.
Table
$table
Filament\Tables\Table
[Action groups in tables only] The table object that this action group belongs to.
Controlling the dropdown offset
You may control the offset of the dropdown using thedropdownOffset() method, by default the offset is set to 8.
The dropdownOffset() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.
dropdownOffset() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.Learn more about utility injection.
Action group
$group
Filament\Actions\ActionGroup
The current action group instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current action group, if one is attached.
Mounted actions
$mountedActions
array<Filament\Actions\Action>
The array of actions that are currently mounted in the Livewire component. This is useful for accessing data from parent actions.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current action group, if one is attached.
Schema
$schema
Filament\Schemas\Schema
[Action groups in schemas only] The schema object that this action group belongs to.
Schema component
$schemaComponent
Filament\Schemas\Components\Component
[Action groups in schemas only] The schema component that this action group belongs to.
Schema component state
$schemaComponentState
mixed
[Action groups in schemas only] The current value of the schema component.
Schema get function
$schemaGet
Filament\Schemas\Components\Utilities\Get
[Action groups in schemas only] A function for retrieving values from the schema data. Validation is not run on form fields.
Schema operation
$schemaOperation
string
[Action groups in schemas only] The current operation being performed by the schema. Usually
create, edit, or view.Schema state
$schemaState
mixed
[Action groups in schemas only] The current value of the schema that this action belongs to, like the current repeater item.
Table
$table
Filament\Tables\Table
[Action groups in tables only] The table object that this action group belongs to.
Controlling the maximum height of the dropdown
The dropdown content can have a maximum height using themaxHeight() method, so that it scrolls. You can pass a CSS length:
The maxHeight() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.
maxHeight() method also accepts a function to dynamically calculate the value. You can inject various utilities into the function as parameters.Learn more about utility injection.
Action group
$group
Filament\Actions\ActionGroup
The current action group instance.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current action group, if one is attached.
Mounted actions
$mountedActions
array<Filament\Actions\Action>
The array of actions that are currently mounted in the Livewire component. This is useful for accessing data from parent actions.
Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current action group, if one is attached.
Schema
$schema
Filament\Schemas\Schema
[Action groups in schemas only] The schema object that this action group belongs to.
Schema component
$schemaComponent
Filament\Schemas\Components\Component
[Action groups in schemas only] The schema component that this action group belongs to.
Schema component state
$schemaComponentState
mixed
[Action groups in schemas only] The current value of the schema component.
Schema get function
$schemaGet
Filament\Schemas\Components\Utilities\Get
[Action groups in schemas only] A function for retrieving values from the schema data. Validation is not run on form fields.
Schema operation
$schemaOperation
string
[Action groups in schemas only] The current operation being performed by the schema. Usually
create, edit, or view.Schema state
$schemaState
mixed
[Action groups in schemas only] The current value of the schema that this action belongs to, like the current repeater item.
Table
$table
Filament\Tables\Table
[Action groups in tables only] The table object that this action group belongs to.