Data Visualization & Status (iOS)
Components specifically designed to show dynamic values or states over time in Live Activities and Widgets.
LinearProgressView
A horizontal progress bar that displays determinate progress or timer-based progress.
Limitations
- When using
timerIntervalfor smooth animations, custom styling properties such asheight,trackColor,cornerRadius, and thethumbcomponent are ignored. The component will use the default system appearance in this mode.
CircularProgressView
A circular progress indicator that displays determinate progress or timer-based progress.
Limitations
- While
timerIntervalis supported, the progress ring will not animate continuously. It only updates its visual state when the component state is refreshed. For a smooth, live-animating progress bar, useLinearProgressView.
Gauge
A gauge indicator for progress visualization (iOS 16+).
Timer
A flexible component for displaying live-updating time intervals. Crucial for Live Activities, it uses native SwiftUI text interpolation to ensure the time updates automatically on the lock screen and in the Dynamic Island without requiring background updates from React Native.
Modes:
- Timer Mode: For fixed intervals (countdowns or counting up to a target). Requires
endAtMsordurationMs. - Stopwatch Mode: For open-ended intervals counting up from a starting point. Requires
startAtMsanddirection="up", but bothendAtMsanddurationMsmust be omitted.
Parameters:
startAtMs(number, optional): Start time in milliseconds since epoch.endAtMs(number, optional): End time in milliseconds since epoch.durationMs(number, optional): Duration in milliseconds. Used ifendAtMsis omitted.direction(string, optional): Count direction. Can be'up'or'down'. Defaults to'down'.textStyle(string, optional): Formatting style.'timer': Standard clock format (e.g.,05:00).'relative': Relative format (e.g.,5m).
showHours(boolean, optional): Whether to show hours (e.g.,1:30:00vs90:00). Defaults tofalse.textTemplates(string, optional): JSON-encoded object withrunningandcompletedtemplates. Use{time}as a placeholder.
Examples:
