A Polymer element for star ratings
Maintained by Carlos Martinez.
See a demo here
Using Bower, run:
bower install star-rating
-
Import Custom Element:
<link rel="import" href="src/star-rating.html">
-
Start using it!
<star-rating></star-rating>
Basic usage:
<star-rating></star-rating>
Custom number of stars:
<star-rating stars="10"></star-rating>
Default rate selected:
<star-rating stars="10" rate="3"></star-rating>
Add your custom styles:
<star-rating stars="10" rate="3" class="custom-class"></star-rating>
Attribute | Options | Default | Description |
---|---|---|---|
stars |
number | 5 | Number of stars |
rate |
number | 0 | Default number of stars selected |
icon |
string | star | Set icon list, star, heart or face |
customcharicon |
string | null |
For selecting a custom icon |