Skip to content

Why no change on the data-theme in <html> after changing theme? #3930

Answered by saadeghi
henryhu712 asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by henryhu712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants