react-verdict
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

react-verdict

A customizable star rating display

npm version npm license

Installation

npm i react-verdict

Usage

import Rating from 'react-verdict';

const Example = () => {
  return (
    <div>
      <Rating value={2.4} />
    </div>
  );
};

Documentation

Props

Prop Name Description
value numeric value of the displayed rating
size numeric font-size of the rendered "star" characters
numberStars number of "stars" in the display
showRatingOnHover boolean for showing the value in a hover tooltip (title attribute)
starRenderer custom function to override the default "star" renderer

See examples in Styleguide.

Package Sidebar

Install

npm i react-verdict

Weekly Downloads

2

Version

2.0.4

License

MIT

Unpacked Size

15.6 kB

Total Files

10

Last publish

Collaborators

  • mmkari