Skip to content

cmartinezv/star-rating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<star-rating>

A Polymer element for star ratings

Maintained by Carlos Martinez.

Demo

See a demo here

Screenshot

Installation

Using Bower, run:

bower install star-rating

Usage

  1. Import Custom Element:

    <link rel="import" href="src/star-rating.html">
  2. Start using it!

    <star-rating></star-rating>

Examples

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>

Options

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

License

MIT License