@brickslab./ui-webQuiz
Star, heart or bolt icon rating with optional half-point precision and hover preview.
Stars (5)
Stars with half precision
Hearts (7)
Bolts
Props
| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
value | number | — | — | Current rating value. |
onChange | (v: number) => void | — | ✓ | Called with the new rating. |
max | number | 5 | — | Total number of icons. |
allowHalf | boolean | false | — | Enables half-point precision. |
icon | "star" | "heart" | "bolt" | "star" | — | Icon type. |
disabled | boolean | false | — | Disables all interactions. |
Override rapide
Tous les paramètres listés dans cette table sont overrideables via les props. Utilisez ce squelette comme point de départ.
<MyComponent
value={0}
onChange={0}
max={5}
allowHalf={false}
icon="star"
disabled={false}
/>valueonChangemaxallowHalficondisabled