ProgressView
A SwiftUI ProgressView component for displaying progress indicators.
Expo UI ProgressView matches the official SwiftUI ProgressView API and supports styling via the progressViewStyle modifier.
Usage
Note: When using the
linearstyle (which is the default for determinate progress),ProgressViewis a flexible-width component, it expands to fill available horizontal space. When usingmatchContentson theHost, you should apply aframemodifier on theProgressViewto give it an explicit width. Alternatively, give theHostan explicit size usingstyle(for example,style={{ width: 300 }}orstyle={{ flex: 1 }}). Thecircularstyle and indeterminate spinner have a fixed size and work withmatchContents.
Indeterminate progress
When no value is provided, the progress view displays an indeterminate indicator (spinner).
import { Host, ProgressView } from '@expo/ui/swift-ui';
export default function IndeterminateExample() {
return (
<Host matchContents>
<ProgressView />
</Host>
);
}
Determinate progress
Provide a value between 0 and 1 to show determinate progress.
import { Host, ProgressView } from '@expo/ui/swift-ui';
export default function DeterminateExample() {
return (
<Host style={{ flex: 1 }}>
<ProgressView value={0.5} />
</Host>
);
}
Progress view styles
Use the progressViewStyle modifier to change the progress view's appearance. Available styles are: automatic, linear, and circular.
import {
Host,
ProgressView,
Text,
VStack,
} from '@expo/ui/swift-ui';
import { progressViewStyle } from '@expo/ui/swift-ui/modifiers';
export default function ProgressViewStylesExample() {
return (
<Host style={{ flex: 1 }}>
<VStack spacing={16}>
<Text>Linear</Text>
<ProgressView
value={0.5}
modifiers={[progressViewStyle('linear')]}
/>
<Text>Circular</Text>
<ProgressView
value={0.5}
modifiers={[progressViewStyle('circular')]}
/>
</VStack>
</Host>
);
}
With label
You can pass custom components as children to provide a label for the progress view.
import { Host, ProgressView, Text } from '@expo/ui/swift-ui';
export default function LabelExample() {
return (
<Host style={{ flex: 1 }}>
<ProgressView value={0.25}>
<Text>Loading...</Text>
</ProgressView>
</Host>
);
}
Tinted progress view
Use the tint modifier to change the progress view's color.
import { Host, ProgressView } from '@expo/ui/swift-ui';
import { tint } from '@expo/ui/swift-ui/modifiers';
export default function TintedExample() {
return (
<Host style={{ flex: 1 }}>
<ProgressView value={0.7} modifiers={[tint('red')]} />
</Host>
);
}
Timer-based progress
Use the timerInterval prop to create a progress view that automatically animates over a time range. This is useful for showing countdown timers or timed operations.
Note: Timer-based progress is only available on iOS 16+ and tvOS 16+.
import {
Host,
ProgressView,
Text,
VStack,
} from '@expo/ui/swift-ui';
export default function TimerExample() {
const startDate = new Date();
const endDate = new Date(Date.now() + 10000); // 10 seconds from now
return (
<Host style={{ flex: 1 }}>
<VStack spacing={16}>
<ProgressView
timerInterval={{ lower: startDate, upper: endDate }}
/>
<ProgressView
timerInterval={{ lower: startDate, upper: endDate }}
countsDown={false}>
<Text>Counting up</Text>
</ProgressView>
</VStack>
</Host>
);
}
API
import { ProgressView } from '@expo/ui/swift-ui';Component
ProgressView
Type: React.Element<ProgressViewProps>
Renders a SwiftUI ProgressView component.
ProgressViewProps
children
Optional • Type: ReactNode
A label describing the progress view's purpose.
countsDown
iOS 16+Optional • Type: boolean • Default: true
A Boolean value that determines whether the view empties or fills as time passes. If true, which is the default, the view empties.
timerInterval
iOS 16+Optional • Type: ClosedRangeDate
The lower and upper bounds for automatic timer progress.
value
Optional • Literal type: union
The current progress value. A value between 0 and 1. When undefined, the progress view displays an indeterminate indicator.
Acceptable values are: number | null
Inherited props
Modifiers
Use these modifiers in the modifiers prop of the SwiftUI version.
Expo UI lets you put any of the 89 modifiers for any view on ProgressView, but not all of them do something here.
- 67 change what you see on ProgressView.
- 1 work, but not in the way that you may expect.
- 9 have no visible effect on ProgressView.
- 13 work only in one place, such as a widget or a
Grid.
Best modifiers for ProgressView
These modifiers are made for ProgressView, or they are the ones that you use most with it.
Also works on ProgressView
ProgressView takes these modifiers too, and each one works in the usual way.
accessibilityAddTraitsaccessibilityHiddenaccessibilityHintaccessibilityIdentifieraccessibilityInputLabelsaccessibilityLabelaccessibilityRemoveTraitsaccessibilityValueallowsTighteningaspectRatiobackgroundbackgroundOverlayblurboldborderbrightnessclippedclipShapecolorInvertcontainerRelativeFrameiOS 17+contentTransitioniOS 16+contrastcornerRadiusdisableddynamicTypeSizeenvironmentfixedSizeforegroundColorforegroundStyleglassEffectgrayscalehiddenhueRotationidignoreSafeAreaitalickerninglineHeightiOS 26+lineLimitlineSpacingluminanceToAlphamaskminimumScaleFactormonospacedDigitmultilineTextAlignmentoffsetonAppearonDisappearonGeometryChangeopacityoverlayredactedrotation3DEffectrotationEffectsaturationscaleEffectshadowstrikethroughstrokeBordertextCasetruncationModeunderline
Needs care on ProgressView
These modifiers work on ProgressView, but not in the way that you may expect.
| Modifier | What to know |
|---|---|
animation | The bar animates its own progress. Use this for the other modifiers on the view. |
No visible effect on ProgressView
ProgressView accepts these modifiers, but you see no change. They do not give an error.
| Modifier | Why nothing happens |
|---|---|
accessibilityElement | It joins the child views into one accessibility element, and ProgressView takes no child views. |
containerShape | It sets the shape that the child views use for containerRelativeShape, and ProgressView takes no child views. |
contentShape | It changes the area that gets touches, and ProgressView gets no touches of its own. |
geometryGroup iOS 17+ | It works on the child views that you give the component, and ProgressView takes none. |
imageScale | It changes only SF Symbols, and ProgressView shows none. |
layoutPriority | It has an effect only when the view shares an axis with other views in a stack. |
onLongPressGesture | In SDK 57, ProgressView does not send modifier events to JavaScript, so the handler does not run. |
onTapGesture | In SDK 57, ProgressView does not send modifier events to JavaScript, so the handler does not run. |
zIndex | It changes the order of views that cover each other in the same parent, and ProgressView does not stack its children. |
Only in some places
These modifiers work only in a widget, in a Grid, in a Namespace or in a parent that asks for them.
| Modifier | Where it works |
|---|---|
activityBackgroundTint | Works only in a Live Activity. It has no effect in the app. |
alignmentGuide | Has an effect only when the parent, such as a VStack or ZStack, aligns its children by the same guide. |
containerBackground | Works only in a widget, or in a navigation container when you use a navigation placement. |
glassEffectId | Works only on a view that also has glassEffect, in a GlassEffectContainer and a Namespace. |
gridCellAnchor iOS 16+ | Works only on a cell of a Grid. Grid is in @expo/ui/swift-ui, but it has no Expo docs page. |
gridCellColumns | Works only on a view in a Grid.Row. Grid is in @expo/ui/swift-ui, but it has no Expo docs page. |
gridCellUnsizedAxes | Works only on a view in a Grid. Grid is in @expo/ui/swift-ui, but it has no Expo docs page. |
gridColumnAlignment iOS 16+ | Works only on a view in a Grid.Row. Grid is in @expo/ui/swift-ui, but it has no Expo docs page. |
invalidatableContent iOS 17+ | Has an effect only when a parent view uses redacted with the invalidated reason. |
matchedGeometryEffect | Works only in a Namespace. Give two views the same id and change between them with an animation. |
privacySensitive | Has an effect only when a parent view uses redacted with the privacy reason. |
unredacted | Has an effect only in a parent view that uses redacted. |
widgetURL | Works only in a widget. It has no effect in the app. |
Sources
The original Expo docs for this page:
- ProgressView (SwiftUI) (
source-of-truth/versions/v57.0.0/sdk/ui/swift-ui/progressview.md)





