Skip to content

Super minimal 5 star rating component for React Native ⭐⭐⭐⭐⭐

Notifications You must be signed in to change notification settings

distilagency/React-Native-5-Star-Ratings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

React Native 5 Star Ratings

Super minimal 5 star rating component for React Native

React Native 5 Star Ratings

Props

Name Value Type Default
Rating 0 - 5 including .5 values INT null
Size Star size in pixels [x, y] Array [20,20]

Example usage inside component

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>
    );
  }
}

Bring your own stars

  • Swap out the png's inside the /assets folder with your own stars.
  • Maintain the filenames or update their reference within /components/StarRating.js

About

Super minimal 5 star rating component for React Native ⭐⭐⭐⭐⭐

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%