Dark and Light Mode Toggle React Demo1
Hi,
Is there any way to toggle between dark-mode and light-mode? The same with the HTML version? I'm planning on creating a switch where a user can switch between light and dark mode without having to refresh the page in React.
Replies (2)
Hi,
You can setup dark mode for the React version following the doc: https://preview.keenthemes.com/metronic8/react/demo1-docs/docs/dark-mode.
We don't have a runtime switcher between light/dark modes.
Regards,
Keenthemes support
You can try to import styles together with custom CSS classes, smth like:
.dark-one {
import './_metronic/assets/sass/style.dark.scss'
}
.light {
import './_metronic/assets/sass/style.scss'
}
And switch these cssClasses in your body tag.
Try this, maybe it will help you.
Regards,
Keenthemes support