Interactive rating card using only vanilla html/css/js

Solution retrospective
Hey there!
That is my attempt to make an interactive rating card which I think I did it!
I'm pretty happy with the result.
Although I feel a little bit unsure about the state management I did in javascript and the approach of hiding and revealing sections using Element#attributeToggle
method.
Also I modified a little bit the user experience so I did the button disabled and chose that gray color so it might look a little bit different in first look. I think it's a little bit better that the button gets enabled after user pick any number. Also I swapped hover and selected colors because to my mind it makes more sense when selected item has the primary color and hover just a little bit offset-ed color than original
Feel free to criticize my work and suggest to me some small or huge changes in order to make my code better. Thank you in advance!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on CoconutDev13's solution.
Join 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