Create a rating component showcase with star animations, half-star support, custom…
- User
Create a rating component showcase with star animations, half-star support, custom icons, hover preview, and satisfying selection feedback.
Assistant
Created a complete rating component showcase with the following:
Components
src/components/Rating/Rating.tsx— main reusable rating componentsrc/components/Rating/RatingStar.tsx— individual star with animations & half-star logicsrc/components/Rating/index.ts— exports
Features implemented
- ⭐ Star animations — springy hover scale, press squeeze/rotation, and a sparkle burst on selection
- ⭐ Half-star support — hover over the left or right half of a star to preview 0.5 increments
- ⭐ Custom icons — demos with hearts, thumbs up, coffee cups, smiles, and flames
- ⭐ Hover preview — temporary fill while hovering, reverts on mouse leave
- ⭐ Satisfying selection feedback — scale bounce + expanding sparkle animation
- ⭐ Keyboard accessible — arrow keys adjust rating
- ⭐ Read-only & disabled states
- ⭐ Custom sizes, colors, gaps, and value formatter
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.