Rating
ImplementedStar rating display + input. Read-only (display) or interactive (input). 5 stars by default, half-stars supported.
patterns/molecules/rating.htmlStar rating display + input. Interactive mode renders a labeled radiogroup (value + label are required); readOnly mode renders a display-only role="img". 5 stars by default.
Rating
Rating molecule (Tier 2)
Star rating display + input. The readOnly path is the one every current adoption target needs (see SocialProof / EventComparisonTable cross-references in the docs page).
Interactive — minimum valid usage (value + label required)
readOnly — display path
readOnly + precision="half" — half-star fill (visual only)
Props
Rating
valuenumber—0 to max
labelstring—maxnumber5Maximum allowed value.
readOnlybooleanfalseMakes the value read-only.
onChange(value: number) => void—Called when the value changes.
sizeRatingSize'md'Wrapper size preset. Known defect: the star glyph is hardcoded 24px at every size — visual scaling is a tracked fix.
precisionRatingPrecision'whole''half' enables half-star fill and pointer half-selection. Keyboard arrows currently step whole stars regardless.
<Rating />Accessibility
Type
1 ruleUsage
Import
import { Rating } from "@epasslive/design-system"Example 1
<Rating value={4} label="Product rating" onChange={setRating} />Example 2
<Rating value={3.5} label="Editor rating" precision="half" readOnly />Anti-patterns
— Do not hardcode data in molecules
— Avoid complex business logic in molecules