User Menu
The user menu in Filament provides a powerful dropdown interface positioned in the top-right corner of your admin panel, offering authenticated users quick access to profile settings, account actions, and custom functionality. Unlike traditional navigation menus, user menus are contextual to the logged-in user and can be dynamically customized based on permissions, roles, or user-specific data. This dropdown serves as the primary hub for user-centric actions that don't belong in the main navigation, creating a clean separation between system navigation and personal account management.
# Basic profile and logout customization
Override the default profile and logout links with custom labels, icons, and destinations. Filament provides dedicated array keys that let you seamlessly replace these core menu items while maintaining their expected positioning and behavior.
use Filament\Panel;
public function panel(Panel $panel): Panel
{
return $panel
->userMenuItems([
'profile' => fn (Action $action) => $action
->label('My Account')
->icon('heroicon-o-user-circle'),
'logout' => fn (Action $action) => $action
->label('Sign Out')
->icon('heroicon-o-arrow-right-on-rectangle'),
]);
}