svelte-stars-hover-rating
v1.0.7
Published
Simple rating on hover component for Svelte
Downloads
15
Readme
Star Rating Component Svelte
A Simple on hover rating component for svelte.
Demo
To use 🔧
If using Svelte:
npm install svelte-stars-hover-rating
If using Sapper (install as a dev dependency):
npm install -D svelte-stars-hover-rating
And import it into your file:
<script>
import {Rating} from 'svelte-stars-hover-rating';
let rate=null
</script>
<Rating bind:rating={rate} />
Props:
| Prop | Type | Default | Required | Description | | ------ | ------ | ------- | -------- | ----------------------------------------------------- | | num | Number | - | No | The number of stars. Default is 5 | | rating | Number | - | No | Passes back the rating value inputted by user |