ProgressBar
Usage
function ProgressBarUsage() {
return (
<View>
<ProgressBar value={60} />
</View>
)
}
Indeterminate
function ProgressBarIndeterminate() {
return <ProgressBar indeterminate />
}
Status
function ProgressBarStatuses() {
return (
<View>
<ProgressBar value={10} />
<ProgressBar value={20} status="accent" />
<ProgressBar value={30} status="success" />
<ProgressBar value={40} status="info" />
<ProgressBar value={50} status="warning" />
<ProgressBar value={60} status="error" />
</View>
)
}
Sizes
function ProgressBarSizes() {
return (
<View>
<ProgressBar value={10} size="small" />
<ProgressBar value={20} size="medium" />
<ProgressBar value={30} size="large" />
</View>
)
}
Custom
function ProgressBarCustom() {
return (
<View>
<ProgressBar indeterminate value={50} color="blue" trackColor="cyan" />
<ProgressBar value={20} color="red" trackColor="green" height={20} />
</View>
)
}
Props
Prop | Data Type | Default Value | Description |
---|---|---|---|
Extends | BaseUIProps | -- | Inherits properties from BaseUIProps |
value | number | -- | Progress value for the track color |
width | number | -- | Width of the progress bar |
height | number | -- | height of the progress bar |
color | ColorValue | -- | Background color of the unfilled color |
trackColor | ColorValue | -- | Main trackColor of the progress bar |
indeterminate | boolean | -- | Set it to true to have the infinite animation |
style | StyleProp<ViewStyle> | -- | Style of the container view |
status | BlossomStatus | primary | -- |
size | BlossomSize | medium | -- |