Design comparison
Solution retrospective
Star rating component done with HTML, CSS, Vanilla JavaScript
I took the interactivity of the buttons a step further so that all previous ratings before the selected rating are highlighted when hovered over and clicked. I also added logic so that user can change their answer before they hit submit. What I found hard was figuring out how to save the selected rating and display the value in the thank you component, but after I figured it out it was really simple solution. I am very proud of my solution as this was my first JavaScript project that I finished almost completely without help. I would be happy to hear any feedback and tips for improvement on my Javascript.
Community feedback
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