Skip to content

Hugomndez/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

  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • Next.js - React framework
  • CSS Modules - For styles

What I learned

:Has() CSS pseudo-class:

.form label:has(input[type='radio']:checked) {
  color: var(--White);
  background-color: var(--Medium-Grey);
}

Useful resources

  • React-Hook-Form - Performant, flexible and extensible forms with easy-to-use validation.

Author