Set Dark Mode For Individual User ?
Hi, i wondering is that possible to create any function that let user to set their own filament theme default mode . i means light and dark mode ?
5 Replies
i means like . every user can set their own theme instead reflect to all user by depending on panel . Any ideas ?
Actually I don't understand this question "set their own theme instead reflect to all user by depending on panel", can you rephrase again?
your OP title, and descriptions ask different tho..
sorry for the confusion . My question is how to let user can set their own theme from default filament theme mode . Because right now . filament have dark mode. so imagine i have few user . so every user can set their own mode to set light or dark mode for their own account .
Ok, by default it's checking system theme (dark or light).. on user menu there is theme toggle to change theme using localStorage.. is that not enough or you want extra db call to replace this system mode?
One thing that may achieve is to save prefer theme in users table, and then check it like my first answer.. otherwise I'm not sure
Or like this (change default theme mode) https://filamentphp.com/docs/3.x/panels/themes#changing-the-default-theme-mode based on users preference
read this link, they explain it clearly.. 🤣