Changing the brand logo
By default, Filament will use your app’s name as a brand logo in the admin panel. You may create aresources/views/vendor/filament/components/brand.blade.php file to provide a custom logo:
Dark mode
By default, Filament only includes a light theme. However, you may allow the user to switch to dark mode if they wish, using thedark_mode setting of the configuration file:
darkMode: 'class' setting in your tailwind.config.js file.
Please note: before enabling dark mode in production, please thoroughly test your admin panel - especially third party plugins, which may not be properly tested with dark mode.When the user toggles between dark or light mode, a browser event called dark-mode-toggled is dispatched. You can listen to it:
Collapsible sidebar
By default, the sidebar is only collapsible on mobile. You may make it collapsible on desktop as well. You must publish the configuration in order to access this feature. Inconfig/filament.php, set the layout.sidebar.is_collapsible_on_desktop to true:
Non-sticky topbar
By default, the topbar sticks to the top of the page. You may make the topbar scroll out of view instead by adding the following styles to your theme or by registering a new stylesheet:Building themes
Filament allows you to change the fonts and color scheme used in the UI, by compiling a custom stylesheet to replace the default one. This custom stylesheet is called a “theme”. Themes use Tailwind CSS, the Tailwind Forms plugin, and the Tailwind Typography plugin, Autoprefixer, and Tippy.js. You may install these through NPM:tailwind.config.js file in the root of your project. The easiest way to do this is by running npx tailwindcss init.
In tailwind.config.js, register the plugins you installed, and add custom colors used by the form builder:
vite.config.js file, register the filament.css theme file:
postcss.config.js file:
webpack.mix.js file, register Tailwind CSS as a PostCSS plugin:
/resources/css/filament.css, import Filament’s vendor CSS:
boot() method:
Loading Google Fonts
If you specify a custom font family in yourtailwind.config.js, you may wish to import it via Google Fonts.
You must publish the configuration in order to access this feature.
Set the google_fonts config option to a new Google Fonts URL to load:
Changing the maximum content width
Filament exposes a configuration option that allows you to change the maximum content width of all pages. You must publish the configuration in order to access this feature. Inconfig/filament.php, set the layout.max_content_width to any value between xl and 7xl, or full for no max width:
7xl.
You may override the maximum content width for a specific page in the admin panel by using the $maxContentWidth property:
Including frontend assets
You may register your own scripts and styles using theregisterScripts() and registerStyles() methods in a service provider’s boot() method:
true as a parameter to registerScripts() to load it before Filament’s core JavaScript. This is useful for registering Alpine.js plugins from a CDN:
Custom meta tags
You can add custom tags to the header, such as<meta> and <link>, using the following:
Notification position
Filament allows you to customize the position of notifications. Inconfig/filament.php, set the layout.notifications.alignment to any value of left, center or right and layout.notifications.vertical_alignment to any value of top, center or bottom:
Render hooks
Filament allows you to render Blade content at various points in the admin panel layout. This is useful for integrations with packages likewire-elements/modal which require you to add a Livewire component to your app.
Here’s an example, integrating wire-elements/modal with Filament in a service provider:
body.start- after<body>body.end- before</body>head.start- after<head>head.end- before</head>content.start- before page contentcontent.end- after page contentfooter.before- before footerfooter.start- start of footer content (centered)footer.end- end of footer content (centered)footer.after- after footersidebar.start- before sidebar contentsidebar.end- after sidebar contentscripts.start- before scripts are definedscripts.end- after scripts are definedstyles.start- before styles are definedstyles.end- after styles are definedglobal-search.start- before global search inputglobal-search.end- after global search inputuser-menu.start- before user menu inputuser-menu.end- after user menu inputuser-menu.account.before- before the account item in the user menuuser-menu.account.after- after the account item in the user menupage.header-widgets.start- before page header widgetspage.header-widgets.end- after page header widgetspage.footer-widgets.start- before page footer widgetspage.footer-widgets.end- after page footer widgetspage.actions.start- before page actionspage.actions.end- after page actionsresource.pages.list-records.table.start- before the resource tableresource.pages.list-records.table.end- after the resource tableresource.relation-manager.start- before the relation manager tableresource.relation-manager.end- after the relation manager table