UNPKG

ih-star-ratings

Version:

A simple lightweight Rating Display Library by Ishraq Hossain.

80 lines (40 loc) 1.38 kB
# IhStarRatings A simple lightweight Rating Display Library by Ishraq Hossain. ![](https://i.ibb.co/x87YXQm/ih-star-ratings-demo.gif) ## Features - Display number Of Star Ratings. - Just need to pass the rating between 0 to 5. [rating]="4.2", [rating]="2.5", [rating]="1.1" like this. - Width is optional parameter. Default width is 250px. You can change the width by passing numeric value to [width]. - Syntax - <ih-star-ratings [rating]="4.1" [width]="150"></ih-star-ratings> ## Installation Install ih-star-ratings with npm ```bash npm install ih-star-ratings ``` Import To AppModule ```bash import { IhRatingsModule } from "ih-star-ratings"; @NgModule({ declarations: [AppComponent], imports: [BrowserModule, IhRatingsModule], providers: [], bootstrap: [AppComponent] }) ``` Syntax ```bash <ih-star-ratings [rating]="3.5"></ih-star-ratings> ``` To Resize the Stars use [width] parameter. It accepts numeric only. ```bash <ih-star-ratings [rating]="3.5" [width]="250"></ih-star-ratings> ``` ## Authors - [@itsishraq](https://www.linkedin.com/in/itsishraq/) - [Website](https://ishraq.in) ## Demo https://angular-heley8.stackblitz.io ## Screenshots ![App Screenshot](https://i.ibb.co/x87YXQm/ih-star-ratings-demo.gif) ## Feedback If you have any feedback, please reach out to us at hi@ishraq.in