5.0.0 • Published 4 months ago
react-star-picker v5.0.0
Default features include
- supports half-star precision
- responsive hover highlighting
- custom number of stars
- value clearing option
- input disabling
Support for custom star-renderer
Even more customizability is provided by the ability to use your own star-renderer. Read more here.
Documentation
Installation
npm i react-star-picker
Usage
Note To make this library SSR compatible, versions starting from 3.0.0 export an ES module instead of the previously exported UMD bundle. The major difference is that styles are no longer bundled with the component code and need to be imported separately from
react-star-picker/styles.css
.
import React, { useState } from 'react';
import StarPicker from 'react-star-picker';
// vvv Starting from v3.0.0 we need to import the styles separately. This is best done in a wrapper component.
import 'react-star-picker/styles.css';
// ^^^
const ParentComponent = () => {
const [rating, setRating] = useState(null);
const onChange = (value) => {
setRating(value);
};
return (
<div>
<StarPicker onChange={onChange} value={rating} />
</div>
);
};
Links to Docs
5.0.0
4 months ago
4.2.2
5 months ago
4.1.0
5 months ago
4.2.1
5 months ago
4.2.0
5 months ago
4.0.0
1 year ago
3.0.0
1 year ago
2.1.5
1 year ago
2.1.4
1 year ago
2.1.2
2 years ago
2.1.1
2 years ago
2.1.3
2 years ago
2.1.0
2 years ago
2.0.13
3 years ago
2.0.12
3 years ago
2.0.11
3 years ago
2.0.9
3 years ago
2.0.10
3 years ago
2.0.8
4 years ago
2.0.7
4 years ago
2.0.6
4 years ago
2.0.5
4 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.1.0
5 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago