Props
| Prop | Type | Default |
|---|---|---|
| value / onValueChange Controlled value (or use defaultValue). | number | — |
| defaultValue Initial value when uncontrolled. | number | 0 |
| max Number of icons. | number | 5 |
| allowHalf Half-icon precision when tapping or dragging. | boolean | false |
| readOnly Display only; fractional values (4.3) fill partially. | boolean | false |
| clearable Tap the current value again to reset to 0. | boolean | false |
| icon Star or heart icons; heart switches the default fill to danger. | "star" | "heart" | "star" |
| size 18 / 28 / 40pt, or any number. | "sm" | "md" | "lg" | number | "md" |
| accent Fill colour. | string | warning / danger |
| gap Space between icons. | number | 20% of size |
| haptics Selection tick for every step while tapping or dragging. | boolean | true |
| disabled Dims and blocks input. | boolean | false |
| style Style for the row of icons. | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Use the variant chips on the preview to switch examples; each maps to a demo you can copy from the Code tab.
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- size
- "sm" | "md" | "lg" | number · default "md"18 / 28 / 40pt, or any number.
- accent
- string · default warning / dangerFill colour.
- style
- StyleProp<ViewStyle>Style for the row of icons.
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
Behaviour & accessibility
- Touch
- Tap or drag across the row to set the value, to half-icon precision with allowHalf. With clearable, tapping the current value clears it.
- Motion
- Icons fill smoothly and pop in a quick stagger with a wobble. When you raise the rating, the top icon throws a spark burst.
- Haptics
- A selection tick plays for every step while tapping or dragging.
- Screen readers
- One adjustable element read as 'N of 5'. Swipe up or down to change it by one step.
- Web
- Works with the mouse too, and shows a pointer cursor while interactive.
Source
FAQ
How do I make a star rating in React Native?
Does Rating work in Expo Go?
react-native-svg, expo-haptics) are all included in Expo Go.How do I add Rating to my Expo app?
react-native-svg, expo-haptics, so the code is yours to change. The install command is on this page for Pro members.Is Rating free?
npx @expokit/cli@latest login) and it installs the full source into your app.Can I change how Rating looks?
useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.