F
Filament4mo ago
o.m

How do I get the current active theme in filament from custom view page?

Is there a way to get the current active theme color? because I have a table and this table is currently following the dark theme so if the Theme is changed to while my table is still black
3 Replies
awcodes
awcodes4mo ago
The theme mode is defined by the frontend so there’s no real way to do anything on the backend to check against that, but if the switch isn’t working correctly I’d say something is off in your custom theme.
o.m
o.mOP4mo ago
Can you help me how to check t on the frontend?
awcodes
awcodes4mo ago
On the front end you can use JS to check for the theme in the localStorage, or check if the html tag has a dark class.

Did you find this page helpful?