1.0.6 • Published 5 years ago

accessible-react-rating v1.0.6

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

accessible-react-rating

It is an accessibile react component for rating. Demo Link

NPM JavaScript Style Guide

Install

npm install --save accessible-react-rating

Usage

import React, { Component } from 'react';

import MyComponent from 'accessible-react-rating';

class Example extends Component {
  render() {
    return <MyComponent />;
  }
}

Properties

PropertyTypeDefaultDescription
emptySymbolelement in the exampleshown when it is not selected
fullSymbolelement in the exampleshown when it is selected.
numberOfRatingsnumber5the number of symbols.
initialRatingnumber0the number of symbols that are selected.
legendstring'your ratings'the legend in the fieldset .
getRatingValuefunction()=>{}the callback function when the symbols are selected .

Accessibility

Keyboard navigation

Use keyboard tab and arrow left/right to select the star

Screen reader

Test with VoiceOver

emptySymbol = , fullSymbol = , numberOfRatings = 5, initialRating = 0, getRatingValue = () => {}, legend = 'your ratings'

License

MIT © bowen31337

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago