This is a simple component used to generate a progress bar for your react-native application.
-
Use npm or yarn to add to your project.
yarn add rn-progress-bar
or
npm i rn-progress-bar
-
Import into the required file:
import ProgressBar from 'rn-progress-bar';
For styling, you can pass any style object as props, and it will override the default styles of the component.
const styles = StyleSheet.create({
progressBar: {
height: 12,
borderRadius: 5
}
});
<ProgressBar
style={styles.progressBar}
primary='#f00'
secondary='#fff'
percentage={75}
/>