RatingGroup
Star rating input built on bits-ui. Renders clickable star items with highlighted state.
Example
Rating: 0 / 5
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 0 | Current rating (bindable) |
onValueChange | (value: number) => void | — | Callback when rating changes |
max | number | 5 | Maximum number of stars |
disabled | boolean | false | Disable interaction |
class | string | — | Additional CSS classes |
Usage
<script>
import { RatingGroup } from '@chrissnell/chonky-ui';
let rating = $state(0);
</script>
<RatingGroup bind:value={rating} max={5} />