npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-number-rating

v0.1.10

Published

Lightweight and customizable rating component for React apps. Supports numeric and color-coded scales from 1 to 10.

Readme

🔢 Priority Numeric Rating

A flexible, colorful, and customizable React numeric rating component. Ideal for rating task priority, level difficulty, or anything that needs a numbered scale from 1 to 100 — with vibrant color transitions from 🔴 Red (High Priority) to 🟢 Green (Low Priority).

🚀 Live Demo

Try it now on CodeSandbox

Component Preview


🚀 Features

  • 🔢 Numeric rating from 1 to 100+
  • 🎨 Automatic red → green color gradient
  • 🌈 Custom background colors per level
  • 🎯 Optional text color override
  • 📱 Mobile-friendly with optional scrolling
  • 🧩 Customizable styling for buttons and container
  • 🛑 Read-only mode for view-only usage

📦 Installation

npm install react-number-rating

🧪 Basic Usage

import React, { useState } from "react";
import PriorityRating from "react-number-rating";

export default function App() {
  const [priority, setPriority] = useState(5);

  return (
    <PriorityRating
      max={10}
      value={priority}
      name="priority"
      onChange={(val) => setPriority(val)}
    />
  );
}

🎛️ Props

| Prop | Type | Default | Description | | -------------- | ---------- | ---------- | ------------------------------------------ | | max | number | 10 | Total rating steps (up to 200) | | value | number | 0 | Selected rating value | | name | string | "rating" | Field name identifier | | onChange | function | - | Callback (value, name) on change | | readonly | boolean | false | Disables button clicks | | colors | array | [] | Override background colors | | textColor | string | "#fff" | Text color for selected buttons | | buttonStyle | object | {} | Custom CSS for each button | | wrapperStyle | object | {} | Custom CSS for wrapper container | | scrollable | boolean | true | Enables horizontal scroll for large scales |

🎨 Examples

  1. 🔧 Custom Styles + Colors

<PriorityRating
  max={15}
  value={priority}
  name="taskPriority"
  onChange={(val) => setPriority(val)}
  colors={["#ff0000", "#ff6600", "#ffcc00", "#ccff33", "#66ff66"]}
  textColor="#000"
  buttonStyle={{ borderRadius: "8px", fontSize: "14px" }}
  wrapperStyle={{ justifyContent: "flex-start" }}
/>
  1. 📱 Scrollable UI (50+ Buttons)

<PriorityRating max={75} value={32} scrollable={true} />
  1. 👀 Read-only Mode

<PriorityRating value={8} readonly={true} />

✅ Conclusion

priority-numeric-rating is a simple yet powerful numeric rating component tailored for task priority, difficulty scaling, or feedback systems. With built-in support for color gradients, full customization, and high scalability (1–100+ values), it helps developers quickly add a clean and user-friendly experience to their React apps.

Whether you're building a project manager, feedback form, quiz app, or gamified tool, this component lets users visually rank items with ease.

🔧 Lightweight. 🎨 Beautiful. ⚙️ Flexible.

👨‍💻 Author

Rajkumar — Software Engineer- Full Stack Developer

🔗 GitHub

🌐 Portfolio

💖 Sponsor This Project

If you find my work helpful or want to support my efforts, consider sponsoring me. Your support helps me stay motivated and continue building open-source tools that benefit the developer community.

🙌 Ways to Sponsor

Every contribution, big or small, makes a difference. Thank you for your support! 🚀