Rating API
View componentThe full prop reference for the Rating component. Collects a numeric star rating.
Import
tsx
import { Rating } from '@structyl/styled';Props
Rating
Star rating input.
| Prop | Type | Default |
|---|---|---|
| value | defaultValue# | numberControlled or uncontrolled rating value. | — |
| onValueChange# | (value: number) => voidCalled when value changes. | — |
| max# | numberNumber of rating items. | 5 |
| disabled | readOnly# | booleanInteraction state. | false |
| name# | stringHidden input name for forms. | — |
| size# | 'small' | 'medium' | 'large'Star size. | 'medium' |
| color# | 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'muted'Checked item color. | 'primary' |
| icon | emptyIcon# | React.ReactNodeCustom checked and unchecked visuals. | — |
| getLabelText# | (value: number) => stringAccessible label generator. | — |
| precision# | numberDocumented precision marker for design parity. | — |
| className# | stringAdditional Tailwind classes merged with the component defaults. | — |
Source code
If you didn't find what you need here, read the component implementation .