Example
Props
boolean
default:true
Whether to show the indicator (
true) or hide it (false).ColorValue
The foreground color of the spinner.Default:
#999999 on iOS, system accent color on Android'small' | 'large' | number
default:"'small'"
Size of the indicator.
'small'- Small size indicator'large'- Large size indicatornumber- Exact size in pixels (Android only)
number type is Android onlyboolean
default:true
Whether the indicator should hide when not animating.Platform: iOS
Platform Differences
iOS
- Uses a native spinner with smooth animation
- Supports
hidesWhenStoppedprop - Default color is gray (#999999)
- Size options are
'small'(20x20) and'large'(36x36)
Android
- Uses
ProgressBarAndroidunder the hood - Default color is the system accent color
- Size can be
'small','large', or a specific number in pixels - Always visible when rendered (doesn’t support
hidesWhenStopped)
Usage with Loading States
Accessibility
ActivityIndicator inherits accessibility props from View, including:accessibilityLabel- Describes the loading state to screen readersaccessibilityHint- Provides additional contextaccessible- Whether the element is an accessibility element