npm i --save nativescript-star-ratings
- Version: 1.0.0
- GitHub:
- NPM: https://www.npmjs.com/package/nativescript-star-ratings
- Downloads:
- Last Day: 4
- Last Week: 33
- Last Month: 62
NativeScript Star Ratings
Installation
tns plugin add nativescript-star-ratings
Configuration
IMPORTANT: Make sure you include xmlns:ui="nativescript-star-ratings" on the Page element
<ui:StarRating emptyBorderColor="white" emptyColor="white" filledBorderColor="black" filledColor="red" value="2" max="5"/>
Angular
import { registerElement } from 'nativescript-angular/element-registry';
registerElement('StarRating', () => require('nativescript-star-ratings').StarRating);
<StarRating emptyBorderColor="white" emptyColor="white" filledBorderColor="black" filledColor="red" value="{{value}}" max="{{max}}"></StarRating>
API
Properties
Property | Default | Type | Required | Description |
---|---|---|---|---|
emptyBorderColor | blue | string |
|
IOS only |
emptyColor | white | string |
|
|
filledBorderColor | blue | string |
|
IOS only |
filledColor | blue | string |
|
|
value | 0 | number |
|
|
max | 5 | number |
|
ScreenShots
IOS | Android |
---|---|
TODO
- [ ] Custom images