Hide Profile Menu Item

Hello, Is it possible to hide initial menu item that filament provides? In this case User icon and User name?
No description
8 Replies
Takashi
Takashi2w ago
it is possible to hide both of them From my experience, we can implement it through several steps if you need, I will give you full explanation
LeandroFerreira
maybe using css?
.fi-dropdown-header {
@apply hidden;
}
.fi-dropdown-header {
@apply hidden;
}
Takashi
Takashi2w ago
I think it is not a good way
SuperUserDo
SuperUserDoOP2w ago
@LeandroFerreira With css works perfectly, was wondering if we hade maybe an override on MenuItem.**
LeandroFerreira
hum, not sure.. take a look I don't see problem hiding it using css if you only want to "hide" the icon/label..
GitHub
filament/packages/panels/resources/views/components/user-menu.blade...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
SuperUserDo
SuperUserDoOP2w ago
Yeah, seems like css is only and valid option here.
Justin.Rhodes
Justin.Rhodes2w ago
Since you have a Profile MenuItem registered, you could instead register the first menu item as your Profile item to override it.
return $panel
->userMenuItems([
'profile' => MenuItem::make()
->icon('heroicon-o-sparkles')
->label(__('Profile'))
->url('/dashboard/profile'),
])
->profile()
return $panel
->userMenuItems([
'profile' => MenuItem::make()
->icon('heroicon-o-sparkles')
->label(__('Profile'))
->url('/dashboard/profile'),
])
->profile()
Justin.Rhodes
Justin.Rhodes2w ago
No description
Want results from more Discord servers?
Add your server