--- title: Vertical Stepper storybookPath: data-display-vertical-stepper isExperimentalPackage: true ---
npm install @spark-web/vertical-stepper---
title: Vertical Stepper
storybookPath: data-display-vertical-stepper
isExperimentalPackage: true
---
Vertical stepper display progress through a sequence of logical and numbered
steps.
``jsx live
const [activeIndex, setActiveIndex] = React.useState(2);
return (
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of
type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was
popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
tone="primary"
onClick={() => {
setActiveIndex(activeIndex + 1);
}}
>
Next
renderActionButton={({ isCompleted, stepIndex }) =>
isCompleted && (
type="button"
tone="info"
onClick={() => {
setActiveIndex(stepIndex);
}}
size="medium"
>
Edit
)
}
/>
tone="secondary"
onClick={() => {
setActiveIndex(stepIndex - 1);
}}
>
Back
tone="primary"
onClick={() => {
setActiveIndex(stepIndex + 1);
}}
>
Next
)}
/>
)}
/>
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book.
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of
type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was
popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
tone="secondary"
onClick={() => {
setActiveIndex(activeIndex - 1);
}}
>
Back
);
``
[data-attribute-map]:
https://github.com/brighte-labs/spark-web/blob/e7f6f4285b4cfd876312cc89fbdd094039aa239a/packages/utils/src/internal/buildDataAttributes.ts#L1