Skip to content

Linear Activity Indicator

Overview

The Linear Activity Indicator is a progress indicator that can be used in both determinate and indeterminate modes, in a horizontal, linear style.

linear activity indicator gif

Component Overview

The Linear Activity Indicator is used to show progress in a linear format. It's commonly used for tasks like loading screens or to indicate that a process is taking place. The indicator can be set to a determinate mode, where progress or to an indeterminate mode.

  • 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
progressSet up progress if you want to determine the indicator (0 to 100)number-
trackHeightHeight of the tracknumber4
indicatorWidthCoeffWidth coefficient for the indicator, from 0 to 1number0.7
trackColorColor of the track (background)ColorValue-
indicatorColorColor of the indicator (active progress)ColorValue-
determinateAnimationDurationDuration of animation for determinate mode (ms)number1000
indeterminateAnimationDurationDuration of animation for indeterminate mode (ms)number1500

Usage Example

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

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