Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Interactive Rating Component Using [ HTML & CSS & JAVASCRIPT ] 🎯

accessibility, animation, angular
C H A R A N πŸŽ―β€’2,670
@0xabdul
A solution to the Interactive rating component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

hello front end mentor Members this is my newbie Challenge Interactive rating component Project Succesfully completed 🌟

About Project : 🎐

  • In this project, you were likely tasked with creating a rating component that allows users to interactively rate something, such as a product or service, using a set of stars or another rating system. This often involves creating a visually appealing interface where users can hover over or click on stars to indicate their rating, with the interface updating dynamically to reflect their selection.

  • the rating component work as intended Can users interact with it easily by hovering over or clicking on the stars to indicate their rating.

  • the rating component responsive across different devices and screen sizes Does it maintain its functionality and visual appeal on both desktop and mobile devices.

  • that ensured that your rating component is accessible to all users, including those who rely on screen readers or keyboard navigation Consider using semantic HTML and providing appropriate ARIA attributes to enhance accessibility.

  • the rating component is full and fully smooth animations

Built With : βš”οΈ

HTML : For creating the structure of the web page.

CSS: For styling the dashboard and making it visually appealing.

JavaScript: For interacting with the DOM, handling user interactions, and manipulating data.

All feedback are wellcome 🀩

What specific areas of your project would you like help with?
  • mobile width (400px to 300px)
  • tablet width (500px to 1500px)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Dylan Heslopβ€’2,460
    @dylan-dot-c
    Posted about 1 year ago

    This seems like an overall great attempt! Love the animations that you have added, but i need to know why you added them since it wasn't apart of the design.

    Also in terms of you JS and HTML markup I see that you have overused IDS in this project which is something that I had a problem with when starting out.

    Anyways I would suggest you take a look back on the code and see how you can reduce the repetitiveness like adding an event listener to each button manually where with classes you could be like

    const ratingButtons = document.querySelectorAll(".ratingbutton")
    
    ratingButtons.forEach((button) => {
        button.addEventLister("click", [function to be called on click])
    })
    
    

    So I would suggest focusing on manipulation the DOM there's a good video I used from freecodecamp for that one. And for Responsiveness once you make the styles general and make use of flexbox you won't need media queries since the layout is the same for all sizes

    Marked as helpful

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
Frontend Mentor logo

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

Frontend Mentor

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

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up β€œinvalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub