Custom Theme with Material Design

Filament 4/5
Also available in Filament 3 version

This project provides an example of style customization through custom theme configuration.

01J2H09P8SYQ9YTMD52S1NR4PY

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Custom Theme with Material Design
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 169 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 169 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

DISCLAIMER: In the end, this theme still needs to be completed and needs more work.

The inspiration for this theme is Material Dashboard 2 by Creative Tim.

The first thing to do is to create a new theme for the Filament using a command:

php artisan make:filament-theme

Then we have to modify our vite.config.js to include the new theme file into built assets:

vite.config.js:

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import tailwindcss from '@tailwindcss/vite';
 
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js', 'resources/css/filament/admin/theme.css'],
refresh: true,
}),
tailwindcss(),
],
});

And of course, we have to register the theme in Filament Panel Provider:

app/Providers/Filament/AdminPanelProvider.php:

class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->authMiddleware([
Authenticate::class,
])
->viteTheme('resources/css/filament/admin/theme.css');
}
}

To make our lives easier we register colors for the Filament based on the original themes colors before doing anything else:

app/Providers/Filament/AdminPanelProvider.php:

class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
->id('admin')
->path('admin')
->login()
->colors([
'primary' => Color::Amber,
'primary' => '#e91e63',
'secondary' => '#7b809a',
'info' => '#03a9f4',
'success' => '#4caf50',
'warning' => '#fb8c00',
'danger' => '#f44335',
])
// ...
}
}
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.