Design comparison
Solution retrospective
Being able to use React for the first time
What challenges did you encounter, and how did you overcome them?Applying the themes
What specific areas of your project would you like help with?How to make the theme switching button work and how to add a sliding event instead of a click
Community feedback
- @lowlifehighwayPosted 4 months ago
Hey, just recently did this challenge myself and for the slider button i used
<input type='range' min='1' max='100' value='1'/>
this way you pass the current value of the slider into a function in js and then use the mousemove(or touchmove for mobile) eventlistener and then for changing the theme you could add a class to your body tag depending on the position of the slider then and have a different set of variables in your css for each of the classeshope this helps
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord