Building My Own Reusable Star Rating Component in React As part of my journey learning React, I decided to stop relying on external npm packages for simple UI features (For security and Reliability reasons) and instead build them from scratch. One of the components I built recently is a fully reusable Star Rating component Features I implemented: - Configurable number of stars (max) - Controlled and uncontrolled rating support - Click interaction to set rating - Custom colors support (border, fill, shadow) - Reset / clear rating option - Callback function triggered when the user selects a rating, passing the updated rating value as an argument , this is helpfull for external handling (e.g: state sync with parent components) - Fully reusable design #React #JavaScript #FrontendDevelopment #WebDevelopment #LearningInPublic #Programming #UI #CleanCode

for now my external components is under heavy developments , when they become more stable and testing them in more projects i will share a GitHub repo that contains some of these components Code snapshots :

  • No alternative text description for this image
Like
Reply

code snapshot 2

  • No alternative text description for this image
Like
Reply

code snapshot 3

  • No alternative text description for this image
Like
Reply

code snapshot 5

  • No alternative text description for this image
Like
Reply

code snapshot 4

  • No alternative text description for this image
Like
Reply

يعطيب العافية اخوي محمد ♥️

See more comments

To view or add a comment, sign in

Explore content categories