Changing the colors
In the configuration, you can easily change the colors that are used. Filament ships with 6 predefined colors that are used everywhere within the framework. They are customizable as follows:Filament\Support\Colors\Color class contains color options for all Tailwind CSS color palettes.
You can also pass in a function to register() which will only get called when the app is getting rendered. This is useful if you are calling register() from a service provider, and want to access objects like the currently authenticated user, which are initialized later in middleware.
Alternatively, you may pass your own palette in as an array of OKLCH colors:
Generating a color palette
If you want us to attempt to generate a palette for you based on a singular hex or RGB value, you can pass that in:Changing the font
By default, we use the Inter font. You can change this using thefont() method in the configuration file:
Changing the font provider
Bunny Fonts CDN is used to serve the fonts. It is GDPR-compliant. If youād like to use Google Fonts CDN instead, you can do so using theprovider argument of the font() method:
LocalFontProvider:
Creating a custom theme
Filament allows you to change the CSS used to render the UI by compiling a custom stylesheet to replace the default one. This custom stylesheet is called a āthemeā. Themes use Tailwind CSS. To create a custom theme for a panel, you can use thephp artisan make:filament-theme command:
--pm option:
- Install the required Tailwind CSS dependencies
- Generate a CSS file in
resources/css/filament/{panel}/theme.css - Attempt to automatically add the theme to your
vite.config.jsinput array - Attempt to automatically register
->viteTheme()in your panel provider - Offer to compile the theme with Vite
Manual configuration
Add the themeās CSS file to the Laravel plugināsinput array in vite.config.js:
Check the command output for the exact file path (e.g.,
admin/theme.css), as it may vary depending on your panelās ID.resources/css/filament.
Using Tailwind CSS classes in your Blade views or PHP files
If you want to use Tailwind CSS utility classes (liketext-primary-600, bg-gray-100, p-4, etc.) in your own Blade views, Livewire components, or PHP files, you must create a custom theme first.
Without a custom theme, any Tailwind classes you add to your code will simply not work - the styles wonāt be applied because theyāre not included in the compiled CSS.
Setting up Tailwind CSS for your project
To use Tailwind CSS classes in your project, you need to set up a custom theme. Run the following command:theme.css file, you will find @source directives that tell Tailwind CSS where to scan for classes:
@source directive in the Tailwind CSS documentation.
Disabling dark mode
To disable dark mode switching, you can use the configuration file:Changing the default theme mode
By default, Filament uses the userās system theme as the default mode. For example, if the userās computer is in dark mode, Filament will use dark mode by default. The system mode in Filament is reactive if the user changes their computerās mode. If you want to change the default mode to force light or dark mode, you can use thedefaultThemeMode() method, passing ThemeMode::Light or ThemeMode::Dark:
Adding a logo
By default, Filament uses your appās name to render a simple text-based logo. However, you can easily customize this. If you want to simply change the text that is used in the logo, you can use thebrandName() method:
brandLogo() method:
brandLogo() method to render an inline SVG element for example:
darkModeBrandLogo() in the same way.
The logo height defaults to a sensible value, but itās impossible to account for all possible aspect ratios. Therefore, you may customize the height of the rendered logo using the brandLogoHeight() method: