Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Atharv/rating

 
 

Repository files navigation

rating

Rating component with SVG stars demo

Installation

$ component install monstercat/rating

Example

var rating = require('rating');
var rate = rating({ stars: 10 });
var container = document.querySelector('.example');

rate.attach(container);
rate.disable();
rate.enable();
rate.rate(5);
rate.set([1,3,4,6]);
rate.on('rating', function(rating){
  console.log(rating);
});

Adjust star size

.star {
  // defaults
  height: 16px;
  width: 16px;
}

License

MIT

About

Rating stars component

Resources

Stars

Watchers

Forks

Packages

No packages published