Skip to contents

Progress

Displays the status of a task that takes a long time.

Export data
x

Anatomy

Import the component and assemble its parts:

Anatomy

API reference

Root

Groups all parts of the progress bar and provides the task completion status to screen readers. Renders a <div> element.

value* number | null —
Name
Description

The current value. The component is indeterminate when value is null or any non-finite number.

Type
number | null
max number 100
Name
Description

The maximum value.

Type
number
Default
100
min number 0
Name
Description

The minimum value.

Type
number
Default
0
format Intl.NumberFormatOptions —
Name
Description

Options to format the value.

Type
Intl.NumberFormatOptions
locale Intl.LocalesArgument —
Name
Description

The locale used by Intl.NumberFormat when formatting the value. Defaults to the user's runtime locale.

Type
Intl.LocalesArgument
getAriaValueText function —
Description

Accepts a function which returns a string value that provides a human-readable text alternative for the current value of the progress bar.

Type
(formattedValue: string, value: number | null) => string
render Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]> —
Name
Description

Replace the default <div>. Spread props onto the host element.

Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in indeterminate state.
data-progressing
Present while the progress is progressing.

Track

Contains the progress bar indicator. Renders a <div> element.

render Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]> —
Name
Description

Replace the default <div>. Spread props onto the host element.

Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in indeterminate state.
data-progressing
Present while the progress is progressing.

Indicator

Visualizes the completion status of the task. Renders a <div> element.

render Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]> —
Name
Description

Replace the default <div>. Spread props onto the host element.

Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in indeterminate state.
data-progressing
Present while the progress is progressing.

Value

A text element displaying the current value. Renders a <span> element.

children Snippet<[formattedValue: string | null, value: number | null]> —
Description

Custom value text. Receives the formatted value ('indeterminate' while indeterminate) and the raw value.

Type
Snippet<[formattedValue: string | null, value: number | null]>
render Snippet<[props: HTMLAttributes<HTMLSpanElement>, state: ProgressState, children: Snippet | undefined]> —
Name
Description

Replace the default <span>. Spread props onto the host element.

Type
Snippet<[props: HTMLAttributes<HTMLSpanElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in indeterminate state.
data-progressing
Present while the progress is progressing.

Label

An accessible label for the progress bar. Renders a <span> element.

render Snippet<[props: HTMLAttributes<HTMLSpanElement>, state: ProgressState, children: Snippet | undefined]> —
Name
Description

Replace the default <span>. Spread props onto the host element.

Type
Snippet<[props: HTMLAttributes<HTMLSpanElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in indeterminate state.
data-progressing
Present while the progress is progressing.