An easy and efficient way to set an user's preferred theme within the frontend. Using LocalStorage and prefers color scheme to initialize the theme, and data-theme attributes to change the value of the body.
- Fix folder structure
- Micro-interaction with toggle-switch
- React example
- Vue example