Command palette

@yasinsensoy/native

React Native · Components

Progress

Progress bar.

2 exports

Live example

The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.

Preview

Loading66%

Code

import { Progress } from "@yasinsensoy/native";

<Progress value={66} label="Loading" showValue />

Events

  1. Events appear here when you interact with the preview.

Import

import { Progress } from "@yasinsensoy/native";

Progress

component

Progress bar. When the value changes the bar slides with the native driver (only transform); smooth even while JS is busy.

Progress({ value, max, label, showValue, valueText, tone, size, accessibilityLabel, style, }: ProgressProps): JSX.Element

Examples

<Progress value={40} label="Upload" showValue />
<Progress value={3} max={10} showValue="3 / 10" tone="success" />
<Progress accessibilityLabel="Preparing" /> // indeterminate

ProgressProps

interface

Props of Progress.

NameTypeDefaultDescription
value?number | nullValue (0–max). With null or when omitted it is indeterminate: the bar slides from left to right.
max?number100Maximum value.
label?ReactNodeLabel on top.
showValue?boolean | ReactNodeValue in the top right: true for a percentage (40%), or your own text ("3 / 10").
valueText?stringValue text read to screen readers (e.g. "3 / 10 files").
tone?Tone"primary"Color.
size?keyof typeof HEIGHT"md"Thickness: 4, 8, 12 pixels.
accessibilityLabel?stringScreen reader label (when the label is not text).
style?StyleProp<ViewStyle>Container style.