Introduction
Fieldsets group components together with a label and border:
use Filament\Schemas\Components\Fieldset;
Fieldset::make('Label')
->schema([
// ...
])
By default, fieldsets have a two-column grid.
label
string | Htmlable | Closure
The fieldset label.
Customizing columns
Customize the grid columns:
Fieldset::make('Label')
->columns([
'default' => 1,
'md' => 2,
'xl' => 3,
])
->schema([
// ...
])
columns
int | array | Closure
default:"2"
The number of columns or responsive column configuration.
Removing the border
Remove the container border:
Fieldset::make('Label')
->contained(false)
->schema([
// ...
])
condition
bool | Closure
default:"true"
Whether to display the border.
Relationship integration
Fieldsets can integrate with singular relationships:
Fieldset::make('Author')
->relationship('author')
->schema([
TextInput::make('name'),
TextInput::make('email'),
])
This automatically manages the relationship data.
The name of the relationship.