Brand Logo Height. brandLogoHeight

Hi. How can I specify a brandLogoHeight for the login page, and one for the navBar ? As seen on https://filamentphp.com/docs/4.x/styling/overview#adding-a-logo if I use ->brandLogoHeight('2rem'); it affects both login form and brandLogo. I need a bigger login logo, and a smoller one in the navBar. Thanks
3 Replies
Julien B. (aka yebor974)
Hi. You can set a default height using the brandlogoheight method on the panel, and then add an auth middleware to adjust the height for navbar
Julien B. (aka yebor974)
Filament Mastery
Branding in Filament multi-tenant: Customize logo & colors - Filame...
Learn how to dynamically set logos and colors in a Filament multi-tenancy panel. Customize branding per tenant using middleware and database configurations.
PabloZagni
PabloZagniOP2d ago
Thanks! I had to use: ->brandLogoHeight( function() { $route = request()->route()->getName() ; $loginRoute = 'filament.user.auth.login' ; $registerRoute = 'filament.user.auth.register' ; if ( $route === $loginRoute || $route === $registerRoute ) { return '10rem'; } return 'auto'; })

Did you find this page helpful?