https://github.com/marinko-peso/rating-custom-element
:snowboarder: Rating Custom Element
https://github.com/marinko-peso/rating-custom-element
Last synced: about 1 month ago
JSON representation
:snowboarder: Rating Custom Element
- Host: GitHub
- URL: https://github.com/marinko-peso/rating-custom-element
- Owner: marinko-peso
- License: mit
- Created: 2018-09-11T08:31:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T06:22:59.000Z (over 6 years ago)
- Last Synced: 2025-03-18T12:57:06.933Z (about 1 month ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rating-custom-element
[](https://github.com/ellerbrock/open-source-badges/)
[](https://github.com/marinko-peso/rating-custom-element/blob/master/LICENSE)
[](https://github.com/Flet/semistandard)
[](https://npm.im/rating-custom-element)
[](https://packagephobia.now.sh/result?p=rating-custom-element)
[](https://david-dm.org/marinko-peso/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](https://htmlpreview.github.io/?https://github.com/marinko-peso/rating-custom-element/blob/master/demo/index.html).
## 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.