Super minimal 5 star rating component for React Native
Name | Value | Type | Default |
---|---|---|---|
Rating | 0 - 5 including .5 values | INT | null |
Size | Star size in pixels [x, y] | Array | [20,20] |
import { View } from 'react-native';
import StarRating from './StarRating';
export default class Example extends Component {
render() {
return (
<View>
<StarRating
rating={3.5}
size={[15,15]}
/>
</View>
);
}
}
- Swap out the png's inside the
/assets
folder with your own stars. - Maintain the filenames or update their reference within
/components/StarRating.js