Progress
Displays the status of a task that takes a long time.
Anatomy
Import the component and assemble its parts:
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
nullor 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.NumberFormatwhen formatting the value. Defaults to the user's runtime locale.- Type
Intl.LocalesArgument
getAriaValueText function —
- Name
- 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>. Spreadpropsonto the host element.- Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
data-indeterminate
data-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>. Spreadpropsonto the host element.- Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
data-indeterminate
data-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>. Spreadpropsonto the host element.- Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
data-indeterminate
data-progressing
Value
A text element displaying the current value. Renders a <span> element.
children Snippet<[formattedValue: string | null, value: number | null]> —
- Name
- 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>. Spreadpropsonto the host element.- Type
Snippet<[props: HTMLAttributes<HTMLSpanElement>, state: ProgressState, children: Snippet | undefined]>
data-complete
data-indeterminate
data-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>. Spreadpropsonto the host element.- Type
Snippet<[props: HTMLAttributes<HTMLSpanElement>, state: ProgressState, children: Snippet | undefined]>