rslabdocs

Progress

A linear bar and a circular ring, both driven by the same 0-to-1 value with an animated fill.

ReanimatedSVGSource

Prerequisites

ProgressCircle renders its ring with SVG, so react-native-svg comes along with Reanimated.


npx expo install react-native-reanimated react-native-svg

Install


npx @rslab/cli add progress

Usage

ProgressBar


import { ProgressBar } from '@/components/ui/ProgressBar';



<ProgressBar value={uploadProgress} />

<ProgressBar value={0.4} color="#a855f7" height={10} />

ProgressCircle


import { ProgressCircle } from '@/components/ui/ProgressCircle';



<ProgressCircle value={uploadProgress} />

<ProgressCircle value={0.75} color="#22c55e" size={72} strokeWidth={8} />

Props

ProgressBar

PropTypeDefault
value
number
-

Progress from 0 to 1. Clamped before it reaches the animation.

color?
string
'#171717'

Fill color.

height?
number
6
className?
string
-

Extend or override the track.

ProgressCircle

PropTypeDefault
value
number
-

Progress from 0 to 1. Clamped before it reaches the animation.

size?
number
56

Diameter in px.

strokeWidth?
number
6
color?
string
'#171717'

Fill stroke color.

trackColor?
string
-

Background ring color. Defaults to a neutral tone based on color scheme.

className?
string
-

Extend or override the outer wrapper.

See exactly how this works with an RSLAB subscription.

Get Pro

On this page