LeafyGreen UI Kit Vertical Stepper
npm install @leafygreen-ui/vertical-stepper``shell`
pnpm add @leafygreen-ui/vertical-stepper
`shell`
yarn add @leafygreen-ui/vertical-stepper
`shell`
npm install @leafygreen-ui/vertical-stepper
`tsx@leafygreen-ui/button
import Button, { Size, Variant } from ;@leafygreen-ui/vertical-stepper
import { VerticalStepper, VerticalStep } from ;
const [currentStep, setCurrentStep] = useState(0);
description={
<>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam
efficitur nunc mattis magna pretium, id mattis metus vestibulum. Integer
cursus ex ante, ut molestie lorem vestibulum id.{' '}
Im a link
>
}
actions={
onClick={() => setCurrentStep(step => step + 1)}
size={Size.Small}
>
primary button
}
/>
description="In eleifend, ante eget rhoncus dignissim, ex ex interdum arcu, quis commodo erat lectus non felis. Nulla malesuada dui non consectetur placerat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos."
actions={
<>
onClick={() => setCurrentStep(step => step - 1)}
size={Size.Small}
>
secondary button
onClick={() => setCurrentStep(step => step + 1)}
size={Size.Small}
variant={Variant.Primary}
>
primary button
>
}
media={}
/>
description="In eleifend, ante eget rhoncus dignissim, ex ex interdum arcu, quis commodo erat lectus non felis. Nulla malesuada dui non consectetur placerat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In eleifend, ante eget rhoncus dignissim, ex ex interdum arcu, quis commodo erat lectus non felis. Nulla malesuada dui non consectetur placerat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In eleifend, ante eget rhoncus dignissim, ex ex interdum arcu, quis commodo erat lectus non felis."
actions={
<>
onClick={() => setCurrentStep(step => step - 1)}
size={Size.Small}
>
secondary button
onClick={() => setCurrentStep(step => step + 1)}
size={Size.Small}
variant={Variant.Primary}
>
primary button
>
}
media={}
/>
`
| Prop | Type | Description | Default |
| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| darkMode | boolean | Determines if the component renders in dark mode | false |number
| currentStep | | Zero-based. The index of the current step that will appear active. All steps will be marked as completed if the currentStep equals the number of steps. | 0 |string
| children | | Two or more components | |
| Prop | Type | Description | Default |
| ----------- | ----------------- | --------------------------------------------------------------- | ------- |
| title | string | The title of the step. | |React.ReactNode
| description | | The description of the step. This will render below the title. | |React.ReactNode
| media | | The image to the right of the text. E.g. or | |React.ReactNode` | Optional buttons that will render below the text. | |
| actions |