Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 3 years ago

Interactive rating component

Kate Dames•250
@funficient
A solution to the Interactive rating component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  • The star icon in the top corner loses its points when I add a background. Is there another way to resolve this perhaps?

  • Are there helpful resources or examples I can look at to add validation feedback to the user when they don't select anything and press the submit button? I was thinking about an inline message just above or below the Submit button that says something like "Please select a rating before submitting." but I am too new to JavaScript to even know what to ask.

I know that I want to validate that it is not null in the forEach method, but I also want to stop the user from submitting, probably with a button:disabled state. If there are any useful resources I can look at, please share!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Kate Dames'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License