osamanagi / filament-daisy-ui-themes
Integrating Daisy Ui themes into Filament apps
Package info
github.com/osamanagi/filament-daisy-ui-themes
Language:JavaScript
pkg:composer/osamanagi/filament-daisy-ui-themes
Fund package maintenance!
Requires
- php: ^8.2
- filament/filament: ^4.0 || ^5.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.7|^4.0
- pestphp/pest-plugin-arch: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- rector/rector: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Apply any of the 35 built-in daisyUI themes to a Filament panel, with a topbar switcher for your users. No npm build, no Tailwind config, no published views.
Supports every Filament 4 and 5 release — from 4.0.0 and 5.0.0 up to the
latest — on PHP 8.2+, including Laravel 11, 12 and 13. Filament 5 requires
Livewire 4; follow the Filament upgrade guide
when upgrading an existing app.
Installation
You can install the package via composer:
composer require osamanagi/filament-daisy-ui-themes
Register the plugin on your panel (e.g. /app/Providers/Filament/AdminPanelProvider.php):
use Nagi\FilamentDaisyUiThemes\FilamentDaisyUiThemesPlugin; return $panel // Your existing panel configuration... ->plugin( FilamentDaisyUiThemesPlugin::make() ->themes(['cupcake', 'nord', 'dracula']) ->defaultTheme('nord') );
Then publish the assets:
php artisan filament:assets
The plugin owns the panel's palette and its light/dark mode, so register it after
any conflicting ->colors() or appearance settings. Give each panel its own
instance.
You're all set!
Methods
| Method | What it does |
|---|---|
themes(['cupcake', 'nord']) |
Sets the themes this panel may use. Default: cupcake, nord, dracula. |
defaultTheme('nord') |
Sets the starting theme. Must be in the list. |
allThemes() |
Allows all 35 shipped themes. |
allLightThemes() |
Allows the 21 light themes. |
allDarkThemes() |
Allows the 14 dark themes. |
themeSwitcher(false) |
Hides the selector; the theme still applies and persists. |
themeSwitcherHook($hook) |
Moves the selector. Defaults to the end of the topbar. |
FilamentDaisyUiThemesPlugin::get() |
The plugin instance for the current panel. |
Bulk helpers
->allThemes() // all 35 ->allLightThemes() // 21 light ->allDarkThemes() // 14 dark
They replace whatever themes() set. When the current default is not in the new
list it resets to the first entry - so allDarkThemes() alone works and lands on
abyss.
Moving or hiding the selector
->themeSwitcherHook(PanelsRenderHook::SIDEBAR_FOOTER) ->themeSwitcher(false)
Any Filament\View\PanelsRenderHook case, or a string hook name, is accepted. A
single-theme panel can hide the selector, and themeSwitcherHook() then renders
nothing. Panels without a topbar, and the simple login layout, have no selector
at all.
Themes
Any of the 35 built-in daisyUI 5.7.46 themes can be enabled by name, for example
->themes(['business', 'abyss', 'wireframe']). defaultTheme() must belong to
that list, and only allowlisted themes appear in the selector.
21 light, 14 dark. The split comes from each theme's own color-scheme
token, not from its name:
| Light (21) | Dark (14) |
|---|---|
| acid, autumn, bumblebee, caramellatte, cmyk, corporate, cupcake, cyberpunk, emerald, fantasy, garden, lemonade, light, lofi, nord, pastel, retro, silk, valentine, winter, wireframe | abyss, aqua, black, business, coffee, dark, dim, dracula, forest, halloween, luxury, night, sunset, synthwave |
Cost of allowing many themes
A panel inlines a stylesheet for each theme it allows: roughly 1 KB gzipped per theme. The default three cost about 3 KB per page load, all 35 about 20 KB. Allowlist what a panel actually needs.
Light themes (21)
The demo's Shop Dashboard in each light theme.
Acid
|
Autumn
|
Bumblebee
|
Caramellatte
|
CMYK
|
Corporate
|
Cupcake
|
Cyberpunk
|
Emerald
|
Fantasy
|
Garden
|
Lemonade
|
Light
|
LoFi
|
Nord
|
Pastel
|
Retro
|
Silk
|
Valentine
|
Winter
|
Wireframe
|
Dark themes (14)
The same page in each dark theme.
Abyss
|
Aqua
|
Black
|
Business
|
Coffee
|
Dark
|
Dim
|
Dracula
|
Forest
|
Halloween
|
Luxury
|
Night
|
Sunset
|
Synthwave
|
Compatibility
PHP 8.2+ and Filament ^4.0 || ^5.0 — every Filament 4 and 5 release from the
first of each major to the latest. The test matrix pins the floors (4.0.0,
5.0.0) alongside the newest release of each major; the browser matrix renders
against these pinned reference versions:
| Filament | Livewire | Laravel |
|---|---|---|
| 4.14.0 | 3.8.9 | 12.69.2 |
| 5.9.0 | 4.4.6 | 12.69.2 |
Composer 2.10 and older Filament releases. Composer now refuses to install dependency versions that carry a security advisory. Filament releases below
4.12.6and5.7.6are affected by upstream Filament advisories, so Composer blocks them no matter what this package requires. If your lock file is older than that, upgrade Filament (composer update "filament/*" --with-all-dependencies) before installing this plugin — or lift the block explicitly withcomposer config policy.advisories.block falseif you accept the risk.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Osama Nagi
- daisyUI by Pouya Saadeghi, for the 35 bundled themes
- All Contributors
License
The MIT License (MIT). Please see License File for more information. The bundled daisyUI theme data carries its own MIT attribution.


































