This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Solution URL: GitHub Solution
- Live Site URL: Vercel live site
- Mobile-first workflow
- Less to Css
- Iconbuddy
I really enjoyed incorporating javascript in this project. It boosted my confidence by giving me some easy wins.
I also learned to incorporate the html dialog
element.
<dialog open id="dialog">
<h4 id="dialog-text">Would you like to re-open the element?</h4>
<button id="re-open" onclick="reOpen()">Yes</button>
</dialog>
addEventListener("click", (e) => {
var target = e.target;
rating.forEach((rating) => {
rating.classList.remove("rates-active");
});
if (Object.values(rating).includes(target)) {
target.classList.add("rates-active");
globalTarget = target;
}
});
I decided to add a lot of extra features to practice and I am really proud of how the project turned out. I would like to learn more about working with svgs in development.
- Blackbox AI - To understand concepts and test your code. DO NOT JUST COPY AND PASTE
- Website - Julia Gaugler
- Frontend Mentor - @ShalomiAhavah