@coturiv/ionic-rating

A lightweight Ionic 4 Rating Component.

Usage no npm install needed!

<script type="module">
  import coturivIonicRating from 'https://cdn.skypack.dev/@coturiv/ionic-rating';
</script>

README

@coturiv/ionic-rating

A lightweight Ionic 4 Rating Component 🎉.

npm version

Install:

npm i @coturiv/ionic-rating

or

yarn add @coturiv/ionic-rating

Usage:

.ts

import { IonicRatingModule } from '@coturiv/ionic-rating';

.html

<rating [(ngModel)]="rate" icon="star" color="tertiary" (ratingChange)="newRate=$event"></rating>
Properties:
Name Type Description
maxRate Number ( 5 or 10) Optional, default 5. If maxRate is 10, star icon is only available.
icon string (star or heart) Optional, default star. But most ionicons(which include outline-icons) can work though.
color string Optional. All Ionic theme colors.
Output:
Name Type Description
ratingChange Function Emits selected rate.