import { ProgressBar } from "@vortexlabs/vortex-native";
<ProgressBar
label="Upload progress"
indeterminate={false}
value={35}
max={100}
valuePosition="top"
/>Features
- Shows progress against a known total.
- Displays an optional percentage beside or below the track, or in the label row.
- Shows work in progress when the total is unknown.
Value and Maximum
value is measured against max, which defaults to 100. When you know the total, pass it directly, such as eight files for an upload.
import { ProgressBar, Stack } from "@vortexlabs/vortex-native";
export const ProgressValues = () => (
<Stack gap={4} width={320} maxWidth="100%">
<ProgressBar label="Preparing files" value={10} />
<ProgressBar label="Uploading files" value={3} max={8} />
<ProgressBar label="Files uploaded" value={100} />
</Stack>
);Percentage Placement
Set valuePosition to show the percentage. Omitting it hides the percentage.
import { ProgressBar, Stack } from "@vortexlabs/vortex-native";
export const ProgressPlacement = () => (
<Stack gap={4} width={320} maxWidth="100%">
<ProgressBar label="End of the track" value={65} valuePosition="end" />
<ProgressBar label="Below the track" value={65} valuePosition="bottom" />
<ProgressBar label="In the label row" value={65} valuePosition="top" />
</Stack>
);Indeterminate
Use indeterminate while work is underway and the total is unknown. Pass value and max once you can measure progress.
import { ProgressBar, Stack } from "@vortexlabs/vortex-native";
export const ProgressIndeterminate = () => (
<Stack width={320} maxWidth="100%">
<ProgressBar label="Connecting to server" indeterminate />
</Stack>
);Accessibility
Description
A string
label names the progress bar. Set ariaLabel when the visible label is omitted or rendered as JSX.Determinate bars expose the current value and percentage. An indeterminate bar reports a busy state without a numeric value.
When Reduce Motion is on, the indeterminate segment stays centered.