Skip to main content

Sequence Map

Sequence Map is a sequence of steps and sub-steps.

Example

Live Editor
Result
Loading...

Variants

Active Step

Sequence Map is able to navigate from the first step to active step. The default value is the first step.

Live Editor
Result
Loading...

Using active to set active step.

Live Editor
Result
Loading...

Current Step

You can set the selected step by current prop. The default value for current step is the active step.

Live Editor
Result
Loading...

Using current to set current step, the current must be less than or equal active

Live Editor
Result
Loading...

Edit Optional Text

Using optionalText to edit optional text or translate to another language.

Live Editor
Result
Loading...

Expand Sub-steps

As default, the sub-steps are expanded if the step is active.

Live Editor
Result
Loading...

Using expand to make the sub-steps are always expanded.

Live Editor
Result
Loading...

Hide Step Number

Using hideStepNumber to hide the label of step number.

Live Editor
Result
Loading...

Step Selection

Using onSelect as a callback function and it returns the selected step.

Live Editor
Result
Loading...

Props

NameTypeDefault
items *
The array of steps
Item[]
active
Sequence Map is able to navigate from the first step to active step, the default is the first step.
number
1
current
The number of selected step, the default is the active step.
number
0
expand
The sub-steps are always expanded. If false, the sub steps are expanded when the step is reached.
boolean
false
optionalText
The text of optional label
string
hideStepNumber
The label of step numbers are hidden.
boolean
false
onSelect
Click action with the selected step data. The steps which are larger than active step are not allowed to click
((step: Item) => void)
dataTestId
A test id to be used by testing libraries. It will be added as a "data-testid" attribute on every step
string
"sequence-step"
data-{foo}
Data attributes can be used by testing libraries to retrieve components or assert their existence
string
* - the prop is required.