3.0.0 • Published 6 years ago

ember-star-rating v3.0.0

Weekly downloads
931
License
MIT
Repository
github
Last release
6 years ago

ember-star-rating

npm version Build Status FOSSA Status

Ember.js component for ratings.

Check out the dummy app here

Installing the Add-on

  • Ember.js v3.4 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

In your application's directory:

$ ember install ember-star-rating

Using the Add-on

Use the component in your template:

<StarRating @rating={{rating}} />

or with positional params.

{{star-rating rating}}

Configuration

OptionTypeDefaultInfo
ratingNumber0The current rating value
numStarsNumber5The number of "stars" to render
readOnlyBooleanfalseWhether the component can be edited or not
anyPercentBooleanfalseAllow setting a rating to any percentage. Example: 3.2
wholeOnlyBooleanfalseOnly allow integer rating values. Example: 1 - 5
useHalfStarsBooleantrueAllow half rating values. Example: 2.5
onHoverFunctionNOOPCalled on the mouseMove and mouseLeave events with the rating value at the time.
onClickFunctionNOOPCalled when the user selects a rating value. This is still invoked when readOnly is set to true
widthNumber26Width of the SVG element
heightNumber26Height of the SVG element
viewBoxString'0 0 26 26'ViewBox of the SVG element
svgPathString'...'Path value of the SVG element
fillColorString'yellow'Color of the SVG element that is considered full (has a rating)
baseColorString'lightgrey'Color of the SVG element that is considered empty

License

See LICENSE.md

FOSSA Status

3.0.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.4.0

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.0.9

8 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago