0.16.2 • Published 2 months ago
react-awesome-stars-rating v0.16.2
React Awesome Stars Rating ·
React Awesome Stars Rating is a simple star component with easy integration for your React applications.
Table of Contents
Previews
Features
- Half stars
- Custom size and color
- Value shows with high precision
- Easy integration with Redux
- Accessibility
- SVG Icons
Installation
npm install react-awesome-stars-rating
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import ReactStarsRating from 'react-awesome-stars-rating';
const onChange = (value) => {
console.log(`React Stars Rating value is ${value}`);
};
const ReactStarsExample = ({ value }) => {
return <ReactStarsRating onChange={onChange} value={value} />;
};
ReactDOM.render(<ReactStarsExample />, document.getElementById('root'));
Documentation
Name | Description | Type | Default |
---|---|---|---|
id | Identifier | String | ${Date.now()} |
value | Value | Number | 0 |
onChange | A function, that will be invoked when value have changed | Function | null |
isEdit | If true the rating is in editing mode | Boolean | true |
isHalf | If true half stars are available | Boolean | true |
count | Count of the stars | Number | 5 |
size | Size of the stars | Number | 25 |
starGap | Gap between the stars | Number | 0 |
className | Class name for button container | String | '' |
primaryColor | Star's color when star is active | String | 'orange' |
secondaryColor | Star's color when star isn't active | String | 'grey' |
isArrowSubmit | Left arrow or right arrow click onvokes onChange | Boolean | false |
Examples
You can see live examples by below links:
0.16.2
2 months ago
0.16.1
4 months ago
0.15.0
7 months ago
0.13.7
11 months ago
0.13.8
11 months ago
0.14.0
10 months ago
0.13.6
1 year ago
0.13.3
1 year ago
0.13.4
1 year ago
0.13.5
1 year ago
0.13.1
1 year ago
0.13.2
1 year ago
0.12.0
2 years ago
0.13.0
2 years ago
0.11.0
2 years ago
0.10.0
2 years ago
0.9.0
2 years ago
0.8.0
2 years ago
0.7.0
2 years ago
0.6.0
3 years ago
0.5.0
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.92
5 years ago
0.1.91
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
1.0.0
6 years ago