Skip to main content

StarRating

Display a read-only rating out of five stars.

StarRating in a native Kindle example

Usage​

Save this example as apps/Reader/App.js in the starter app.

import React from 'react';
import {StarRating, View} from 'react-kindle';

export default function App() {
return (
<View style={{padding: 24}}>
<StarRating value={3.5} size={32} />
</View>
);
}

Props​

PropType / defaultDescription
valuefinite numberRating, clamped to 0–5.
sizepositive number = 24Kindle Symbol glyph size.
styleText styleText layout and color.

Fractions above .25 and below .75 show a half star; .75 and above round to the next full star. The control provides a spoken rating label.