Skip to content

Circular Activity Indicator

Overview

The Circular Activity Indicator is a versatile loading spinner used to indicate an ongoing process, supporting both determinate and indeterminate modes. It provides smooth animations and can be customized based on your app's design requirements.

circular activity indicator gif

Component Overview

This component displays a circular activity indicator, either with a specific progress value (determinate) or as a continuously spinning spinner (indeterminate). It can be customized with different sizes, colors, and animation durations.

  • Determinate Mode: Requires setting the progress property, which defines the exact progress value from 0 to 100.

  • Indeterminate Mode: This mode shows a continuous animation, without the need to specify the progress.

Properties

namedescriptiontypedefault
progressDefines the current progress of the indicator in a determinate state (from 0 to 100).number-
sizeThe size of the circular indicator. Controls both the height and width of the spinner.number120
strokeWidthThe thickness of the indicator's stroke. It is automatically calculated as 4% of the size (i.e., 0.04 * size).number0.04 of the size
trackColorThe color of the background track (the non-progressing portion of the circle).ColorValue-
indicatorColorThe color of the active progress indicator.ColorValue-
determinateAnimationDurationThe duration (in milliseconds) of the animation when the indicator is in a determinate state.number1000
indeterminateAnimationDurationThe duration (in milliseconds) of the animation when the indicator is in an indeterminate state.number800

Usage Example

typescript
import { CircularActivityIndicator } from '@computools/react-native-material-components';

<CircularActivityIndicator
  progress={50} // 50% progress
/>