Steps
import {Steps} from "@qui/react-vscode"
Examples
Showcase
Dark Modern
import type {ReactElement} from "react"import {Steps} from "@qui/react-vscode"const items = [{description: "Contact Info", title: "First", value: "first"},{description: "Date & Time", title: "Second", value: "second"},{description: "Select Rooms", title: "Third", value: "third"},]export default function Showcase(): ReactElement {return (<Steps.Root count={items.length}><Steps.List>{items.map((item, index) => (<Steps.Item key={index} index={index}><Steps.Trigger><Steps.Indicator>{index + 1}</Steps.Indicator><span>{item.title}</span></Steps.Trigger><Steps.Separator /></Steps.Item>))}</Steps.List></Steps.Root>)}
API
StepsProps
| Name & Description | Option(s) | Default |
|---|---|---|
The component used for the root node. It can be a React component or element. |
| |
ReactNode | ||
The total number of steps. If omitted, this will be inferred from child
items. |
| |
The initial index of the active step. |
| |
The document's text/writing direction. |
| "ltr" |
id attribute. If
omitted, a unique identifier will be automatically generated for
accessibility. |
| |
The controlled step index. |
| |
Callback fired when the active step changes. |
| |
The orientation of the step list. |
| 'horizontal' |
Type
| ElementType| ComponentType
Description
The component used for the root node. It can be a React component or element.
Type
number
Description
The total number of steps. If omitted, this will be inferred from child
items.
Type
number
Description
The initial index of the active step.
Type
'ltr' | 'rtl'
Default
"ltr"
Description
The document's text/writing direction.
Type
string
Description
id attribute. If
omitted, a unique identifier will be automatically generated for
accessibility.
Type
number
Description
The controlled step index.
Type
(index: number,event?:| MouseEvent| KeyboardEvent<any>,) => void
Description
Callback fired when the active step changes.
Type
| 'horizontal'| 'vertical'
Default
'horizontal'
Description
The orientation of the step list.