CarsXE

Search docs

Search pages, components, and skills.

Steps

A step indicator for multi-step flows. Used on its own it is a controllable indicator; wrapped in StepsRoot it also drives panels, which stay mounted while hidden so form state survives navigation. useSteps exposes next, prev, and goTo for footer buttons, and linear stops a step ahead of the current one from being clicked while still allowing programmatic jumps.
  1. Vehicle
    VIN or plate
  2. Contact
    Where to send it
  3. Review
    Confirm and order

Installation

Import from the package. Do not run shadcn add in your app.

tsx
import { Steps } from "@carsxe/design-system/components/steps"

Usage

tsx
import { Steps } from "@carsxe/design-system/components/steps"

const [value, setValue] = React.useState(1)

<Steps steps={checkout} value={value} onValueChange={setValue} />

Vertical

  1. Vehicle
    VIN or plate
  2. Contact
    Where to send it
  3. Review
    Confirm and order

Linear

  1. Vehicle
    VIN or plate
  2. Contact
    Where to send it
  3. Review
    Confirm and order

The third indicator is disabled: linear steps can be revisited but not skipped ahead.

Wizard with panels

  1. Vehicle
    VIN or plate
  2. Contact
    Where to send it
  3. Review
    Confirm and order

Disabled step

  1. Vehicle
  2. Finance
  3. Review

API Reference

PropTypeDefault
stepsStep[]from StepsRoot
valuenumber—
defaultValuenumber0
onValueChange(value: number) => void—
orientation"horizontal" | "vertical""horizontal"
linearbooleanfalse