Skip to content

marif0025/star-ratings

Repository files navigation

Star Rating Component

A lightweight Js library to add star rating component.

Features

  • Add interactive star rating components to get rating from users.
  • Add readonly star rating component to show rating to

Live preview url

Go to live preview

Add in your project

    <!-- data-rating for initial rating -->
    <div class="ratings" data-rating="3.8"></div>
    ratingPlugin.init({
        selector: 'ratings', //Rating component class
        onChange: (el, value) => { //On change function, which returns user input and set rating function
            console.log('Rating Value : ', value);
            ratingPlugin.setRating(el, 3.5)
        }
    });

License

MIT

Free Software, Hell Yeah!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published