rating-custom-element
v0.0.4
Published
Rating Custom Element. Intended as plug and play HTML element to enable custom rating. For in-browser usage.
Downloads
37
Maintainers
Readme
rating-custom-element
:snowboarder: Rating Custom Element
Intended as plug and play HTML element to enable custom rating. Styling is left completely to the end user. For in-browser usage.
View demo.
Installation
Available via npm:
npm i rating-custom-element
Usage
Include rating-element.js
to your html or import "rating-custom-element"
if installed via npm.
Add x-rating-element
html element to your dom on the place where you wish to have a rating element.
Options:
- value - initial value [default: 0]
- number - number of rating elements [default: 5]
- default-class - class name for rank elements [default: x-rating]
- marked-class - class name added to selected rank elements [default: x-marked]
License
MIT.