Why no change on the data-theme
in <html> after changing theme?
#3930
-
I use the theme controller: https://daisyui.com/components/theme-controller/?lang=en#theme-controller-using-a-swap It works. But no change on the attribute data-theme of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
theme-controller
works by the value of the input.For example if
<input type="checkbox" value="synthwave" class="toggle theme-controller" />
is checked,synthwave
will be active. So if you want to detect the theme using JS, you can monitor (or bind) the value of checkbox.Let me know if you have a question.