Giter Site home page Giter Site logo

star-rating's Introduction

<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

star-rating's People

Contributors

antono avatar cmartinezv avatar link2twenty avatar marcus7777 avatar muffycompo avatar sepans avatar shljk avatar zenorocha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

star-rating's Issues

gh-pages

Update gh-pages so the demo is updated and it used the new component page style.

Star rating elements don't mark any stars when binding the rate property

Star rating elements don't mark any starts when binding the rate property esp in an iron-list.

A quick solution is to include rate in the isActive call:
<span class$="{{isActive(index)}}" on-tap="_setRate" data-index$="{{index}}">
to
<span class$="{{isActive(index, rate)}}" on-tap="_setRate" data-index$="{{index}}">
Actually might want to include starts to if used in binding too.

Handy element though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.