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

1.0.4 • Public • Published

npm version

React-animation-rating

A simple component to display rating as stars

Installing as a package

npm i react-animation-rating

Usage

import React, {useState} from 'react';
import RatingAnimation from "react-animation-rating";
import 'react-animation-rating/dist/style.css';

function App() {
  const [value, setValue] = useState(4);
  return (
    <div className="App">
      <div className="App-header">
        <RatingAnimation value={value} onChange={setValue}/>
      </div>
    </div>
  );
}

export default App;

Demo

https://u4aew.github.io/react-animation-rating/

demo

Options

Name Type Required Default
sizeStar number false 24
countItem number false 5
value number true
colorStar string false #ffc107
colorInactiveStar string false #9e9e9e
disabled boolean false false
className string false
onChange function false

Readme

Keywords

Package Sidebar

Install

npm i react-animation-rating

Weekly Downloads

2

Version

1.0.4

License

ISC

Unpacked Size

16.4 kB

Total Files

9

Last publish

Collaborators

  • u4aew