Skip to content

chiroro-jr/interactive-rating-component

Repository files navigation

Frontend Mentor - Interactive rating component solution

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.

Table of contents

Overview

The challenge

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

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • TailwindCSS - A utility-first CSS framework
  • Flexbox
  • Grid
  • Mobile-first workflow
  • Vite - Next generation frontend tooling

What I learned

I'm particularly proud of how I used radio buttons to track the selected rating instead of implementing some complex state management and a lot of DOM manipulations. At first I was thinking of bringing a lightweight DOM library like AlpineJS, but then I remembered that forms can track state and went for a simple solution.

Useful resources

There's a Stack Overflow thread I used to help me style a label based on the state of the radio input button it's linked to. You can check out the thread here.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published