interactive rating component with CSS and Javascript
Design comparison
Solution retrospective
This is my first project on javascript, I would love to know your opinion. I also experience some difficulty in using colors, especially for the button, if you have suggestions on how to go about it I will be happy to learn from you.
Community feedback
- @MarcusTuliusCiceronPosted over 2 years ago
Hi congrats on this challenge,
First remark is when user didn't select rank and click on submit, page should not switch. You can try to create a local JS variable storing the last rank selected by user and on click on submit check if this have a value > 0.
Then regarding color you create a class active state and add it to the rank button you clicked. Don't forget to remove it from the other rank button or else you will have multiple active button at same time and it will be confusing for user.
I hope this is clear and will help you
Happy coding :D
0
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