Progress List

Loading...

Installation

Add the component with the CLI.

npx shadcn@latest add @intentui/progress-list

Manual installation

Install the dependencies, then copy the component source into your project.

npm install react-aria-components @heroicons/react cn

Anatomy

import { ProgressList, ProgressListItem } from "@/components/ui/progress-list"
<ProgressList aria-label="Insurance Claim" selectedKey="details">
  <ProgressListItem id="policy">Policy</ProgressListItem>
  <ProgressListItem id="incident">Incident</ProgressListItem>
  <ProgressListItem id="details">Details</ProgressListItem>
  <ProgressListItem id="documents">Documents</ProgressListItem>
  <ProgressListItem id="submit">Submit</ProgressListItem>
</ProgressList>

Each item needs a unique id, and selectedKey must match the current item’s id. Steps before it are shown as completed; steps after it are upcoming. Give the list an accessible label with aria-label or aria-labelledby.

Examples

Collection

Use the items prop and a render function to create progress steps from a data collection.

Loading...

Controlled

Keep the current step in state and update selectedKey as the user moves through the process.

Loading...

Component API

ProgressList

ProgressList extends the React Aria Components <ProgressList> component.

selectedKeyKey
classNamestring

See React Aria for the full ProgressList API, including collection and accessibility props.

ProgressListItem

ProgressListItem extends the React Aria Components <ProgressListItem> component.

idKey
classNamestring

See React Aria for the full ProgressListItem API.

Design