Close
Angular React Web Components Blazor
Open Source

React Circular Progress Overview

The Ignite UI for React Circular Progress Indicator component provides a visual indicator of an application’s process as it changes. The circular indicator updates its appearance as its state changes.

React Circular Progress Example

Usage

First, you need to the install the corresponding Ignite UI for React npm package by running the following command:

npm install igniteui-react

You will then need to import the IgrCircularProgress, its necessary CSS, and register its module, like so:

import { IgrCircularProgressModule, IgrCircularProgress } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';
IgrCircularProgressModule.register();

The simplest way to start using the IgrCircularProgress is as follows:

<IgrCircularProgress value="100"></IgrCircularProgress>

Progress Types

You can set the type of your indicator, using the Variant attribute. There are five types of circular progress indicators - primary (default), error, success, info, and warning.

<IgrCircularProgress value="100" variant="success"></IgrCircularProgress>

Indeterminate Progress

If you want to track a process that is not determined precisely, you can set the Indeterminate property. Also, you can hide the default label of the Ignite UI for React IgrCircularProgress by setting the HideLabel property and customize the progress indicator default label via the exposed LabelFormat property.

<IgrCircularProgress value="100" indeterminate="true"></IgrCircularProgress>

The following sample demonstrates the above configuration:

Animation Duration

You can use the AnimationDuration property on the IgrCircularProgress component to specify how long the animation cycle should take in milliseconds.

<IgrCircularProgress animationDuration="5000" indeterminate="true"></IgrCircularProgress>

Gradient Progress

The progress bar can be customized to use a color gradient instead of a solid color by using the gradient slot and the IgrCircularGradient component, which defines the gradient stops.

For each IgrCircularGradient defined as gradient slot of Ignite UI for React IgrCircularProgress a SVG stop element would be created. The values passed as color, offset and opacity would be set as stop-color, offset and stop-opacity of the SVG element without further validations.

<IgrCircularProgress >
    <IgrCircularGradient slot="gradient" offset="0%" color="#ff9a40">
    </IgrCircularGradient>
    <IgrCircularGradient slot="gradient" offset="50%" color="#1eccd4">
    </IgrCircularGradient>
    <IgrCircularGradient slot="gradient" offset="100%" color="#ff0079">
    </IgrCircularGradient>
</IgrCircularProgress>

Styling

The IgrCircularProgress component exposes CSS parts for almost all of its inner elements:

NameDescription
svgThe progress SVG element.
gradient_startThe progress linear-gradient start color.
gradient_endThe progress linear-gradient end color.
trackThe progress ring’s track area.
fillThe progress indicator area.
labelThe progress label.
valueThe progress label value.
indeterminateThe progress indeterminate state.
primaryThe progress indicator primary state.
dangerThe progress indicator error state.
warningThe progress indicator warning state.
infoThe progress indicator info state.
successThe progress indicator success state.

Using this CSS parts we have almost full control over the Circular Progress styling.


igc-circular-progress {
  margin: 20px;
  --diameter: 50px;
}

igc-circular-progress::part(gradient_end),
igc-circular-progress::part(gradient_start) {
  stop-color: var(--ig-success-200);
}

igc-circular-progress::part(track) {
  stroke: var(--ig-gray-400);
}

API References

Additional Resources