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 & DescriptionOption(s)Default
The component used for the root node. It can be a React component or element.
| ElementType
| ComponentType
React children prop.
ReactNode
The total number of steps. If omitted, this will be inferred from child items.
number
The initial index of the active step.
number
The document's text/writing direction.
'ltr' | 'rtl'
"ltr"
id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
string
The controlled step index.
number
Callback fired when the active step changes.
    (
    index: number,
    event?:
    | MouseEvent
    | KeyboardEvent<any>,
    ) => void
    The orientation of the step list.
    • horizontal: steps are displayed left-to-right.
    • vertical: steps are displayed top-to-bottom.
    | 'horizontal'
    | 'vertical'
    'horizontal'
    
    Type
    | ElementType
    | ComponentType
    Description
    The component used for the root node. It can be a React component or element.
    Description
    React children prop.
    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.
      • horizontal: steps are displayed left-to-right.
      • vertical: steps are displayed top-to-bottom.