Inputs and selection
Rating
stars · display (half stars, showValue, count) or input with onChange (44pt radio stars)
function RatingDemo() { const [stars, setStars] = React.useState(0); return ( <View className="gap-4"> <Rating value={4.5} showValue count={120} size="md" /> <View className="gap-1"> <Text className="font-medium">How was your order?</Text> <Rating value={stars} onChange={setStars} accessibilityLabel="Rate your order" /> <Text className="text-muted-foreground text-sm">{stars ? `${stars} of 5` : 'Tap a star'}</Text> </View> </View> );}Usage
Show a score with the number beside it; ask for one after something is done (an order delivered), not in the middle of a task.
API
<Rating value onChange? showValue? count? size? accessibilityLabel? />Get it
Already in every copy of the native kit:
import { Rating } from '@/components/kit/rating';Details
- Exports
Rating- Packages
- lucide-react-native@^1.21.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-haptics, @halftone-native/lib-palette-context, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- stars, review, score, feedback
- Registry JSON
- /r/native/rating.json
function RatingDemo() { const [r, setR] = React.useState(0); return ( <div className="flex flex-col items-start gap-4"> <Rating value={4.6} showValue count={128} /> <Rating value={r} onChange={setR} aria-label="Rate your order" /> </div> );}Usage
Show a score with the number beside it; ask for one after something is done (an order delivered), not in the middle of a task.
API
<Rating value onChange? showValue? count? size? aria-label? />Get it
Already in every copy of the web kit:
import { Rating } from '@/components/kit/rating';Details
- Exports
Rating- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Also searched as
- stars, review score
- Registry JSON
- /r/web/rating.json
Agents: the whole registry is at /llms.txt.