API for progress-spinner

API reference for Angular Material progress-spinner

import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';

Selector: mat-progress-spinner mat-spinner

Exported as: matProgressSpinner
Properties
Name Description
@Input()

color: string

Theme color of the progress spinner. This API is supported in M2 themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/progress-spinner/styling.

For information on applying color variants in M3, see https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants

@Input({ transform: numberAttribute })

diameter: number

The diameter of the progress spinner (will set width and height of svg).

@Input()

mode: ProgressSpinnerMode

Mode of the progress bar.

Input must be one of these values: determinate, indeterminate, buffer, query, defaults to 'determinate'. Mirrored to mode attribute.

@Input({ transform: numberAttribute })

strokeWidth: number

Stroke width of the progress spinner.

@Input({ transform: numberAttribute })

value: number

Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow.

Default mat-progress-spinner options that can be overridden.

Properties
Name Description

color: ThemePalette

Default theme color of the progress spinner. This API is supported in M2 themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/progress-spinner/styling.

For information on applying color variants in M3, see https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants

diameter: number

Diameter of the spinner.

strokeWidth: number

Width of the spinner's stroke.

Possible mode for a progress spinner.

type ProgressSpinnerMode = 'determinate' | 'indeterminate';

Injection token to be used to override the default options for mat-progress-spinner.

const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS: InjectionToken<MatProgressSpinnerDefaultOptions>;
Deprecated
const MatSpinner: typeof MatProgressSpinner;

API reference for Angular Material progress-spinner-testing

import {MatProgressSpinnerHarness} from '@angular/material/progress-spinner/testing';

Harness for interacting with a MDC based mat-progress-spinner in tests.

Properties
Name Description

static hostSelector: '.mat-mdc-progress-spinner'

The selector for the host element of a MatProgressSpinner instance.

Methods
async
getMode

Gets the progress spinner's mode.

Returns
Promise<ProgressSpinnerMode>

async
getValue

Gets the progress spinner's value.

Returns
Promise<number | null>

async
host

Gets a Promise for the TestElement representing the host element of the component.

Returns
Promise<TestElement>

static
with

Gets a HarnessPredicate that can be used to search for a progress spinnner with specific attributes.

Parameters

options

ProgressSpinnerHarnessFilters = {}

Options for filtering which progress spinner instances are considered a match.

Returns
HarnessPredicate<T>

a HarnessPredicate configured with the given options.

A set of criteria that can be used to filter a list of MatProgressSpinnerHarness instances.

Azure & Blue theme selected.