Defines a <star-rating>
custom element.
value
: A float value repersenting the rating value. Default value is0
.max
: An int value repersenting the maximum rating value. Deafult value is5
.changeable
: When present the rating can be changed by clicking. Dispatches achange
event with old and new values asdetail
.
value
: Get and set the rating value. (float
)max
: Get and set the maximum possible rating value. (int
)
--star-fill-color
--star-back-color
--star-stroke
--star-stroke-width
--star-stroke-opacity
<star-rating></star-rating>
<star-rating value="2.5"></star-rating>
<star-rating value="5" max="10"></star-rating>
<star-rating value="2" max="5" changeable></star-rating>
Check example.html to view it in action.