1.0.4 • Published 2 years ago

react-animation-rating v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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

NameTypeRequiredDefault
sizeStarnumberfalse24
countItemnumberfalse5
valuenumbertrue
colorStarstringfalse#ffc107
colorInactiveStarstringfalse#9e9e9e
disabledbooleanfalsefalse
classNamestringfalse
onChangefunctionfalse
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago