Light/dark mode with custom components
Hey guys,
my custom blade components do not seem to respect the manual override of using filament's dark or light mode. They always show the styling of the systems mode.
Image 1: System is light mode, filament uses system theme
Image 2: System is light mode, filament uses dark theme
Image 3: System is dark mode, filament uses system theme



9 Replies
How did you style them?
For example
Basically it looks ok if the filament's theme is corresponding to the systems theme. If I change it manually it does not apply to my custom components.
Is the
.dark class added to the html element when you switch to dark mode?And does it apply the
color-scheme?
Yes

But the element looks a bit weird:

Yep. That's weird indeed and looks like some issue on TW side.
Okay, what would be an approach to solve this? Any pointers?
Sorry, no idea. I'd check the Tailwind setup.