Product Rating Heatmap
React.js
medium
20 mins
Requirements:
- Display a grid of products with color-coded ratings (1-5 stars)
- Use color intensity to represent rating levels (red for low, green for high)
- Show product name and rating on each grid item
- Include hover effects for better user experience
- Add modal that opens when clicking a product
- Display detailed product stats in the modal (rating, reviews, price, description)
- Include close button and backdrop click to close modal
- Use proper accessibility attributes for screen readers
- Implement responsive grid layout for different screen sizes
Elements and Attributes for Testing:
- Product Grid - Must have
data-testid="product-grid"for testing - Product Items - Must have
data-testid="product-item"andonClickhandler - Modal - Must have
data-testid="product-modal"for testing - Close Button - Must contain text "Close" and have
onClickhandler - Product Data - Must display product name, rating, and price
- Color Coding - Products must have different background colors based on rating
- Modal Content - Must show detailed product information when opened
Preview what you need to build
Companies:
yahoo
twitter
wipro
Solve Similar questions š„
Want to upskill? Explore our courses!
Namaste DSA
Master DSA from scratch with numerous problems, and expert guidance.
Namaste React
Wanna dive deep into React and become Frontend Expert? Learn with me now!
Namaste Frontend System Design
The most comprehensive and detailed course for frontend system design.
Namaste Node.js
Wanna dive deep into Node.js? Enroll into `Namaste Node.js` now!
