Skip to content

u4aew/react-animation-rating

Repository files navigation

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

About

A simple component to display rating as stars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published