0.0.5 • Published 5 years ago

nativescript-vue-star-rating v0.0.5

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

NativeScript-Vue Star Rating

A plugin which provides a 1 to 5 Star Rating component to display and rate.

Features:

  • Customizable stars by size, fill color and empty color.
  • CSS only UI, no images used.
  • Tap a star to rate from 1 to 5.

Screenshots

Screenshot 1

Installation

npm i --save nativescript-vue-star-rating
// main.js
import Vue from 'nativescript-vue';
...
import StarRating from 'nativescript-vue-star-rating';
Vue.use(StarRating);

Use in template:

...
<StarRating :value="rating" size="90" />
...

## Props

PropTypeDescriptionDefault Value
valueNumberThe rating value1
sizeString, NumberSize in pixels of width and height of the star75
fillColorStringCSS color for the filled stars'#FFEB0A'
emptyColorStringCSS color for the empty stars'#ABABAB'
outlineColorStringCSS color for the star outline'#000'

Events

EventReturnsDescription
ratingSelectedNumberReturns the rating selected by tap from 1 to 5

If you want to use the component as display only, just don't add an event listener for this event.

Caveats

Star outline is a work in progress, you can customize the color but the outline width is still missing.

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago