accessible-react-rating
1.0.6 • Public • Published
It is an accessibile react component for rating. Demo Link

npm install --save accessible-react-rating
import React, { Component } from 'react';
import MyComponent from 'accessible-react-rating';
class Example extends Component {
render() {
return <MyComponent />;
}
}
Property |
Type |
Default |
Description |
emptySymbol |
element |
in the example |
shown when it is not selected |
fullSymbol |
element |
in the example |
shown when it is selected. |
numberOfRatings |
number |
5 |
the number of symbols. |
initialRating |
number |
0 |
the number of symbols that are selected. |
legend |
string |
'your ratings' |
the legend in the fieldset . |
getRatingValue |
function |
()=>{} |
the callback function when the symbols are selected . |
Use keyboard tab and arrow left/right to select the star
Test with VoiceOver
emptySymbol = ,
fullSymbol = ,
numberOfRatings = 5,
initialRating = 0,
getRatingValue = () => {},
legend = 'your ratings'
MIT © bowen31337
Package Sidebar
Install
npm i accessible-react-rating
Weekly Downloads