© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Ehsan

Disabling dark mode for form component

I have created a custom form component and embedded the component on a page. I have also disabled darkMode for the panel using panel configuration
->darkMode(false)
->darkMode(false)
which has disabled the same on admin panel. But the form component added to a view is displayed in
darkMode
darkMode
.

I tried to disable the same using Javascript, but it doesn't work.
localStorage.theme = 'light';
document.documentElement.classList.remove('dark')
localStorage.theme = 'light';
document.documentElement.classList.remove('dark')

The form is basically using OS default theme instead, which in my case is dark.

I also tried with
darkMode: 'class'
darkMode: 'class'
in
tailwind.config.js
tailwind.config.js


I am following this example https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component

Any help rendered will be appreciated.
Adding a form to a Livewire component - Form Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Disabling dark mode for form component only
FilamentFFilament / ❓┊help
3y ago
dark mode in form livewire component
FilamentFFilament / ❓┊help
2y ago
How to set dark mode for form in livewire component
FilamentFFilament / ❓┊help
14mo ago
Disable dark mode in form builder
FilamentFFilament / ❓┊help
3y ago