Steps
Use Steps to show where people are in a process with a fixed sequence of stages, such as a checkout, an onboarding flow or a deployment, and what is left. For events that already happened, use Timeline; for how much of one task is done, use Progress.
Put each Step inside Steps: a step takes its number and its status from it, and a Step on its own gives a warning.
Steps shows where a process stands as an ordered list of numbered Steps. Steps before current are finished, the ones after it are waiting, and the current step is marked with aria-current="step".
Each status has its own color: finished steps are green, the step in progress blue, a failed step red, and waiting steps grey. In a row the connector follows the title on the same line and runs on to the next marker, with the description on the line below; on a narrow screen the text moves under the marker.
#Demos
#Interactive
Move through the steps with the buttons or by clicking a title, and set the current step’s status or any step’s own status. current can go one past the last step, which marks every step finished.
- 1Name and region
- 2Pick the machine
- 3Invite your team
- 4
#Basic
current counts from 1. Each Step takes a title and a description (or children).
- Create CompletedName and region
- 2ConfigurePick the machine
- 3ShareInvite your team
- 4Launch
#Status
status sets the current step’s status: process (the default), finish, error or wait. A Step’s own status overrides the one it gets from current.
- Build Completed
- Test Completed
- Deploy FailedStaging is unreachable
- 4Verify
- Build Completed
- Test Completed
- Deploy Completed
- Verify Completed
#Size
- Cart Completed
- 2Shipping
- 3Payment
- Cart Completed
- 2Shipping
- 3Payment
#Vertical
- Add a machine CompletedConnect a machine to the workspace
- 2Configure the agentChoose a runtime and the tools it can use
- 3Start a conversationMention the agent in any channel
#Custom icons
finishIcon and errorIcon replace the check and the cross for every step; a Step’s icon replaces its number while it waits or is in progress.
- Choose files Completed
- Upload
- 3Review
#Clickable
With onUpdateCurrent every step’s title becomes a button that covers the step, and clicking it reports the step’s number. disabled keeps a step from being picked.
- 2
- 3
- 4
#Steps Props
| Name | Type | Default | Description | Version |
|---|---|---|---|---|
current | number | undefined | The current step, counted from 1. Without it every step is in progress. | Unreleased |
defaultCurrent | number | undefined | Initial current step when uncontrolled. | Unreleased |
status | process | finish | error | wait | process | Status of the current step. | Unreleased |
size | small | medium | medium | Marker and text size. | Unreleased |
vertical | boolean | false | Lays the steps out in a column. | Unreleased |
finishIcon | ReactNode | undefined | Replaces the check mark of finished steps. | Unreleased |
errorIcon | ReactNode | undefined | Replaces the cross of failed steps. | Unreleased |
onUpdateCurrent | (current: number) => void | undefined | Called with the clicked step’s number. Setting it makes the steps clickable. | Unreleased |
#Step Props
| Name | Type | Default | Description | Version |
|---|---|---|---|---|
title | ReactNode | undefined | The step’s title. | Unreleased |
description | ReactNode | undefined | Shown under the title; children override it. | Unreleased |
status | process | finish | error | wait | undefined | Overrides the status from current. | Unreleased |
icon | ReactNode | undefined | Replaces the number while the step waits or is in progress. | Unreleased |
disabled | boolean | false | Keeps the step from being clicked. | Unreleased |
finishIcon, errorIcon, icon and title all take any ReactNode.