Skip to content

Instantly share code, notes, and snippets.

@B-Carcamo
Created October 25, 2023 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save B-Carcamo/832cdafa6cd8788f9d53bfbb7a47bff0 to your computer and use it in GitHub Desktop.
Save B-Carcamo/832cdafa6cd8788f9d53bfbb7a47bff0 to your computer and use it in GitHub Desktop.
Change logo from dark to light in filament v3
<?php
//add darkModeBrandLogo() method to AdminPanelProvider.php file
use Filament\Panel;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->darkModeBrandLogo(fn () => view('filament.logo.dark'))
->brandLogo(fn () => view('filament.logo.light'))
->brandLogoHeight('2rem');
}
/*import the images to the public folder, which is located in the resources folder in laravel.
Add this line to the resources/js/app.js file*/
import './bootstrap';
import.meta.glob([
'../images/**',
'../fonts/**',
]);
<--!resources/views/filament/dark.blade.php -->
<img
src="{{ Vite::asset('resources/images/logoDark.png') }}"
alt="Logo Dark"
class="h-10"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment