Skip to content

Progress

function Progress(__namedParameters): Element;

Horizontal progress bar with determinate and indeterminate modes.

In determinate mode the filled / empty proportions are rendered as two Box elements whose widths are controlled by Yoga (percentage + flexGrow). This means the bar resizes instantly on terminal resize with no extra React render cycle.

In indeterminate mode the marquee animation uses useLayout to read the exact track width. The 100 ms animation timer provides frequent re-renders so any stale value is corrected quickly.

ParameterType
__namedParametersProgressProps

Element

// Determinate progress
<Progress value={0.65} showPercent label="Downloading" />
// Indeterminate marquee
<Progress indeterminate label="Loading..." />

PropertyTypeDescription
empty?stringCharacter(s) for the empty portion. Default ”░”.
filled?stringCharacter(s) for the filled portion. Default ”█”.
indeterminate?booleanAnimate as indeterminate (marquee). Default false.
label?stringOptional label text displayed before the bar.
showPercent?booleanShow percentage text after the bar. Default false.
style?StyleOuter container style.
value?numberProgress value 0..1. Omit when indeterminate.
width?DimensionValueWidth of the progress bar. Default “100%”.