F
Filament14mo ago
Dkil

How can I customize the sidebar to have this design?

5 Replies
jaocero
jaocero14mo ago
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
return $builder->groups([
NavigationGroup::make('')
->items([
NavigationItem::make('Dashboard')
->icon('heroicon-o-home')
->isActiveWhen(fn (): bool => request()->routeIs('filament.admin.pages.dashboard'))
->url(fn (): string => Dashboard::getUrl()),
]),
NavigationGroup::make('Accounts')
->items([
...AdminUserResource::getNavigationItems(),
...OrganizationUserResource::getNavigationItems(),
...SecurityResearcherResource::getNavigationItems(),
])
->icon('heroicon-o-users'),
NavigationGroup::make('')
->items([
...OrganizationResource::getNavigationItems(),
]),
]);
})
->navigation(function (NavigationBuilder $builder): NavigationBuilder {
return $builder->groups([
NavigationGroup::make('')
->items([
NavigationItem::make('Dashboard')
->icon('heroicon-o-home')
->isActiveWhen(fn (): bool => request()->routeIs('filament.admin.pages.dashboard'))
->url(fn (): string => Dashboard::getUrl()),
]),
NavigationGroup::make('Accounts')
->items([
...AdminUserResource::getNavigationItems(),
...OrganizationUserResource::getNavigationItems(),
...SecurityResearcherResource::getNavigationItems(),
])
->icon('heroicon-o-users'),
NavigationGroup::make('')
->items([
...OrganizationResource::getNavigationItems(),
]),
]);
})
In you panel provider put this, then in your resources just remove all protected static ?string $navigationIcon
Solution
jaocero
jaocero14mo ago
No description
ConnorHowell
ConnorHowell14mo ago
Main theory is to manually setup your groups as per: https://filamentphp.com/docs/3.x/panels/navigation#customizing-navigation-groups Then for every resource/page in that group you remove the icon and it'll do that
ZedoX
ZedoX14mo ago
Add icon to your nav groups & remove them from your Resources
Dkil
DkilOP14mo ago
Thank you guys ❤️

Did you find this page helpful?