Navigation
Overview
By default, Filament will register navigation items for each of your resources, custom pages, and clusters. These classes contain static properties and methods that you can override, to configure that navigation item.
If you're looking to add a second layer of navigation to your app, you can use clusters. These are useful for grouping resources and pages together.
Customizing a navigation item's label
By default, the navigation label is generated from the resource or page's name. You may customize this using the $navigationLabel
property:
protected static ?string $navigationLabel = 'Custom Navigation Label';
Alternatively, you may override the getNavigationLabel()
method:
public static function getNavigationLabel(): string
{
return 'Custom Navigation Label';
}
Customizing a navigation item's icon
To customize a navigation item's icon, you may override the $navigationIcon
property on the resource or page class:
protected static ?string $navigationIcon = 'heroicon-o-document-text';
If you set $navigationIcon = null
on all items within the same navigation group, those items will be joined with a vertical bar below the group label.
Switching navigation item icon when it is active
You may assign a navigation icon which will only be used for active items using the $activeNavigationIcon
property:
protected static ?string $activeNavigationIcon = 'heroicon-o-document-text';