Progress
Displays the status of a task that takes a long time.
View as MarkdownAnatomy
Import the component and assemble its parts:
import { Progress } from '@base-ui-components/react/progress';
<Progress.Root>
  <Progress.Label />
  <Progress.Track>
    <Progress.Indicator />
  </Progress.Track>
  <Progress.Value />
</Progress.Root>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
—
value*number | null
—- Name
- Description
- The current value. The component is indeterminate when value is - null.
- Type
- number | null
- Default
- null
aria-valuetextstring
—
aria-valuetextstring
—- Name
- Description
- A string value that provides a user-friendly name for - aria-valuenow, the current value of the meter.
- Type
- string | undefined
getAriaValueTextfunction
—
getAriaValueTextfunction
—- 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 | null, value: number | null, ) => string) | undefined
localeIntl.LocalesArgument
—
localeIntl.LocalesArgument
—- Name
- Description
- The locale used by - Intl.NumberFormatwhen formatting the value. Defaults to the user's runtime locale.
- Type
- Intl.LocalesArgument
styleReact.CSSProperties | function
—
styleReact.CSSProperties | function
—- Name
- Type
- | React.CSSProperties | (( state: Progress.Root.State, ) => CSSProperties | undefined) | undefined
minnumber
0
minnumber
0
- Name
- Description
- The minimum value. 
- Type
- number | undefined
- Default
- 0
maxnumber
100
maxnumber
100
- Name
- Description
- The maximum value. 
- Type
- number | undefined
- Default
- 100
formatIntl.NumberFormatOptions
—
formatIntl.NumberFormatOptions
—- Name
- Description
- Options to format the value. 
- Type
- Intl.NumberFormatOptions | undefined
classNamestring | function
—
classNamestring | function
—- Name
- Description
- CSS class applied to the element, or a function that returns a class based on the component’s state. 
- Type
- | string | ((state: Progress.Root.State) => string | undefined)
renderReactElement | function
—
renderReactElement | function
—- Name
- Description
- Allows you to replace the component’s HTML element with a different tag, or compose it with another component. - Accepts a - ReactElementor a function that returns the element to render.
- Type
- | ReactElement | (( props: HTMLProps, state: Progress.Root.State, ) => ReactElement)
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in interminate state.
data-progressing
Present while the progress is progressing.
Track
Contains the progress bar indicator.
Renders a <div> element.
styleReact.CSSProperties | function
—
styleReact.CSSProperties | function
—- Name
- Type
- | React.CSSProperties | (( state: Progress.Root.State, ) => CSSProperties | undefined) | undefined
classNamestring | function
—
classNamestring | function
—- Name
- Description
- CSS class applied to the element, or a function that returns a class based on the component’s state. 
- Type
- | string | ((state: Progress.Root.State) => string | undefined)
renderReactElement | function
—
renderReactElement | function
—- Name
- Description
- Allows you to replace the component’s HTML element with a different tag, or compose it with another component. - Accepts a - ReactElementor a function that returns the element to render.
- Type
- | ReactElement | (( props: HTMLProps, state: Progress.Root.State, ) => ReactElement)
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in interminate state.
data-progressing
Present while the progress is progressing.
Indicator
Visualizes the completion status of the task.
Renders a <div> element.
styleReact.CSSProperties | function
—
styleReact.CSSProperties | function
—- Name
- Type
- | React.CSSProperties | (( state: Progress.Root.State, ) => CSSProperties | undefined) | undefined
classNamestring | function
—
classNamestring | function
—- Name
- Description
- CSS class applied to the element, or a function that returns a class based on the component’s state. 
- Type
- | string | ((state: Progress.Root.State) => string | undefined)
renderReactElement | function
—
renderReactElement | function
—- Name
- Description
- Allows you to replace the component’s HTML element with a different tag, or compose it with another component. - Accepts a - ReactElementor a function that returns the element to render.
- Type
- | ReactElement | (( props: HTMLProps, state: Progress.Root.State, ) => ReactElement)
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in interminate state.
data-progressing
Present while the progress is progressing.
Value
A text label displaying the current value.
Renders a <span> element.
styleReact.CSSProperties | function
—
styleReact.CSSProperties | function
—- Name
- Type
- | React.CSSProperties | (( state: Progress.Root.State, ) => CSSProperties | undefined) | undefined
children((formattedValue: string | null, value: number | null) => ReactNode) | null
—
children((formattedValue: string | null, value: number | null) => ReactNode) | null
—- Name
- Type
- | (( formattedValue: string | null, value: number | null, ) => ReactNode) | null | undefined
classNamestring | function
—
classNamestring | function
—- Name
- Description
- CSS class applied to the element, or a function that returns a class based on the component’s state. 
- Type
- | string | ((state: Progress.Root.State) => string | undefined)
renderReactElement | function
—
renderReactElement | function
—- Name
- Description
- Allows you to replace the component’s HTML element with a different tag, or compose it with another component. - Accepts a - ReactElementor a function that returns the element to render.
- Type
- | ReactElement | (( props: HTMLProps, state: Progress.Root.State, ) => ReactElement)
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in interminate state.
data-progressing
Present while the progress is progressing.
Label
An accessible label for the progress bar.
Renders a <span> element.
styleReact.CSSProperties | function
—
styleReact.CSSProperties | function
—- Name
- Type
- | React.CSSProperties | (( state: Progress.Root.State, ) => CSSProperties | undefined) | undefined
classNamestring | function
—
classNamestring | function
—- Name
- Description
- CSS class applied to the element, or a function that returns a class based on the component’s state. 
- Type
- | string | ((state: Progress.Root.State) => string | undefined)
renderReactElement | function
—
renderReactElement | function
—- Name
- Description
- Allows you to replace the component’s HTML element with a different tag, or compose it with another component. - Accepts a - ReactElementor a function that returns the element to render.
- Type
- | ReactElement | (( props: HTMLProps, state: Progress.Root.State, ) => ReactElement)
data-complete
Present when the progress has completed.
data-indeterminate
Present when the progress is in interminate state.
data-progressing
Present while the progress is progressing.