svelte-star-rating v2.0.0
3.79 / 5 76%
live
<script lang="ts">
  import { StarRating } from '@ernane/svelte-star-rating';
  import type { RatingConfig } from '@ernane/svelte-star-rating';

  let config: RatingConfig = {
    readOnly: false,
    countStars: 5,
    score: 3.785,
    showScore: false,
    range: { min: 0, max: 5, step: 0.001 },
    starConfig: {
      size: 52,
      fillColor: '#F9ED4F',
      strokeColor: '#BB8511',
      unfilledColor: '#1e2235',
      strokeUnfilledColor: '#3a3f5c',
    },
  };
</script>

<StarRating bind:config on:change={handleChange} />