Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
StarRatingProps
Also accepts all props of Omit<React.ComponentProps<"div">, "onChange" | "defaultValue">
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | — |
| defaultValue | number | 0 | — |
| onChange | (value: number) => void | — | — |
| max | number | 5 | — |
| size | number | 24 | Star size in px |
| readOnly | boolean | false | — |
| label | string | "Rating" | — |
Install
$ npx shadcn@latest add https://chromotion.dev/r/star-rating.jsonThe CLI installs the base component; your customizations live in the code generated on the Customize tab.