1.0.1 • Published 2 years ago

progress-bar-rn v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

progress-bar-rn


A light and simple progress bar component created for React Native

Installation


npm install progress-bar-rn

Usage


import ProgressBar from "progress-bar-rn";

<ProgressBar
        containerShadowStyle={{ ... }}
        trackColor={"#00A0E9"}
        trackStyle={{
          borderTopLeftRadius: 10,
          borderBottomLeftRadius: 10,
          borderTopRightRadius: 10,
          borderBottomRightRadius: 10,
        }}
        type={'timing'} // optional
        animationStarted={state.alarmStatus === 'pending'} // only useful when type is timing
        duration={60 * 1000} // only useful when type is timing
        initialValue={currentProgress}// only useful when type is timing
        progress={50}
        style={{
          borderRadius: 10,
          backgroundColor: "black",
          marginHorizontal: 15,
          paddingVertical: 20,
          marginBottom: 20,
        }}
      >
        /* children components */
</ProgressBar>

Props


PropDescriptionDefault
containerShadowStyleSet shadow of containernone
trackColorSet color of tracknone
trackStyleSet style of tracknone
progressSet current progress percentage, e.g. 500
styleSet style of containernone
typeoptional: timing  When type is set to timing, then the increment of the progress bar will be continuousnone
initialValueoptional  Used to set where the continuous increment starts0
durationoptional  Used to set the duration (in ms) of the continuous increment from 0 to 100500
animationStartedSet whether or not the continuous increment is startedfalse