Introduction
Some schemas can be long and complex. You may want to use tabs to reduce the number of components that are visible at once:As well as allowing a static value, the make() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
make() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Setting the default active tab
The first tab will be open by default. You can change the default open tab using theactiveTab() method:
As well as allowing a static value, the activeTab() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
activeTab() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Setting a tab icon
Tabs may have an icon, which you can set using theicon() method:
As well as allowing a static value, the icon() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
icon() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Setting the tab icon position
The icon of the tab may be positioned before or after the label using theiconPosition() method:
As well as allowing a static value, the iconPosition() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
iconPosition() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Setting a tab badge
Tabs may have a badge, which you can set using thebadge() method:
As well as allowing a static value, the badge() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
badge() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
badgeColor() method:
As well as allowing a static value, the badgeColor() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
badgeColor() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Using grid columns within a tab
You may use thecolumns() method to customize the grid within the tab:
As well as allowing a static value, the columns() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
columns() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Disabling scrollable tabs
Tabs are rendered horizontally by default, and are scrollable when they exceed the available width. You may disable scrolling using thescrollable(false) method:
Using vertical tabs
You can render the tabs vertically by using thevertical() method:
vertical() method to control if the tabs should be rendered vertically or not:
As well as allowing a static value, the vertical() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
vertical() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Removing the styled container
By default, tabs and their content are wrapped in a container styled as a card. You may remove the styled container usingcontained():
As well as allowing a static value, the contained() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
contained() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Persisting the current tab in the user’s session
By default, the current tab is not persisted in the browser’s local storage. You can change this behavior using thepersistTab() method. You must also pass in a unique id() for the tabs component, to distinguish it from all other sets of tabs in the app. This ID will be used as the key in the local storage to store the current tab:
persistTab() method accepts a boolean value to control if the active tab should persist or not:
As well as allowing static values, the persistTab() and id() methods also accept functions to dynamically calculate them. You can inject various utilities into the function as parameters.
persistTab() and id() methods also accept functions to dynamically calculate them. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.
Persisting the current tab in the URL’s query string
By default, the current tab is not persisted in the URL’s query string. You can change this behavior using thepersistTabInQueryString() method:
tab key. You can change this key by passing it to the persistTabInQueryString() method:
As well as allowing a static value, the persistTabInQueryString() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.
persistTabInQueryString() method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.Learn more about utility injection.
Component
$component
Filament\Schemas\Components\Component
The current component instance.
Get function
$get
Filament\Schemas\Components\Utilities\Get
A function for retrieving values from the current schema data. Validation is not run on form fields.
Livewire
$livewire
Livewire\Component
The Livewire component instance.
Eloquent model FQN
$model
?string<Illuminate\Database\Eloquent\Model>
The Eloquent model FQN for the current schema.
Operation
$operation
string
The current operation being performed by the schema. Usually
create, edit, or view.Eloquent record
$record
?Illuminate\Database\Eloquent\Model
The Eloquent record for the current schema.