Stepper

A component that guides users through a multi-step process with visual progress indication.

Overview

The Stepper component guides users through sequential steps with separate selection and status states. A step can be inactive, active, or disabled while also using the incomplete, completed, or loading status. Previous and current steps are progress-colored separately from the status icon. It supports horizontal and vertical layouts, controlled and uncontrolled values, animated step content, and optional URL state.

Stepper indicators are surface-aware. Unreached indicators land two levels above the parent surface with the matching contextual border. Reached indicators use the brand fill, while status controls whether the marker shows a number, check icon, or spinner. Hovering a step increases the indicator and the wrapper around the title/description without requiring local color overrides.

Usage

import {
  Stepper,
  StepperDescription,
  StepperHeading,
  StepperIndicator,
  StepperItem,
  StepperSeparator,
  StepperTitle,
  StepperTrigger,
} from "@tilt-legal/cubitt-components/stepper";
<Stepper defaultValue={1}>
  <StepperItem step={1}>
    <StepperTrigger>
      <StepperIndicator />
      <StepperHeading>
        <StepperTitle>Account</StepperTitle>
        <StepperDescription>Create your account</StepperDescription>
      </StepperHeading>
    </StepperTrigger>
    <StepperSeparator />
  </StepperItem>
  <StepperItem step={2}>
    <StepperTrigger>
      <StepperIndicator />
      <StepperHeading>
        <StepperTitle>Profile</StepperTitle>
        <StepperDescription>Add your profile details</StepperDescription>
      </StepperHeading>
    </StepperTrigger>
  </StepperItem>
</Stepper>

URL State

Provide paramName to sync the active step with the current URL.

<Stepper defaultValue={1} paramName="step">
  <StepperItem step={1}>
    <StepperTrigger>
      <StepperIndicator />
      <StepperHeading>
        <StepperTitle>Account</StepperTitle>
      </StepperHeading>
    </StepperTrigger>
  </StepperItem>
  <StepperItem step={2}>
    <StepperTrigger>
      <StepperIndicator />
      <StepperHeading>
        <StepperTitle>Profile</StepperTitle>
      </StepperHeading>
    </StepperTrigger>
  </StepperItem>
  <StepperItem step={3}>
    <StepperTrigger>
      <StepperIndicator />
      <StepperHeading>
        <StepperTitle>Complete</StepperTitle>
      </StepperHeading>
    </StepperTrigger>
  </StepperItem>
</Stepper>

Examples

States

Toggle one centered step through selection state and status.

Basic

Vertical

Mixed Elements

Progress Bar

URL State

Animated Content

API Reference

Stepper

The root component owns active-step state and orientation. It does not add a surface of its own.

PropTypeDefaultDescription
defaultValuenumber0The initial active step when uncontrolled.
valuenumber-Controlled active step value.
onValueChange(value: number) => void-Called when the active step changes.
orientation"horizontal" | "vertical""horizontal"Stepper layout direction.
animateContentbooleanfalseAnimates non-trigger StepperItem content in and out.
classNamestring-Additional classes for layout and sizing.
...propsReact.HTMLAttributes<HTMLDivElement>-Standard div attributes.

URL State Props

PropTypeDefaultDescription
paramNamestring-URL parameter name for syncing the step.
paramValuenumber-Controlled value for URL state.
onUrlValueChange(value: number | null) => void-Called when the URL value changes.
paramClearOnDefaultbooleantrueRemoves the URL parameter when the value matches the default.
paramThrottlenumber-Throttle window for URL updates.
paramDebouncenumber-Debounce window for URL updates.

StepperItem

Container for one step. It provides selection state and status to its trigger, indicator, heading, title, description, and separator.

PropTypeDefaultDescription
stepnumber-Step value for this item.
completedbooleanfalseSets the item status to completed. This can combine with inactive or active selection state.
disabledbooleanfalseDisables the step trigger.
loadingbooleanfalseSets the item status to loading. This can combine with inactive or active selection state.
classNamestring-Additional classes for the item.
...propsReact.HTMLAttributes<HTMLDivElement>-Standard div attributes.

StepperTrigger

Interactive control that activates its step.

PropTypeDefaultDescription
renderReactElement-Custom element to render as the trigger.
classNamestring-Additional classes for trigger layout.
...propsReact.ButtonHTMLAttributes<HTMLButtonElement>-Standard button attributes.

StepperIndicator

Visual step marker. Unreached indicators are surface-aware; reached indicators use the brand fill. Status controls whether the marker shows the step number, check icon, or spinner.

PropTypeDefaultDescription
childrenReactNode-Custom indicator content. Defaults to step number, check icon, or spinner.
classNamestring-Additional classes for shape and size.
...propsReact.HTMLAttributes<HTMLSpanElement>-Standard span attributes.

StepperHeading

Wrapper for step title and description content. It receives the shared hover background from the step trigger and the active selection background when its step is active.

PropTypeDefaultDescription
classNamestring-Additional classes for layout, alignment, and spacing.
...propsReact.HTMLAttributes<HTMLDivElement>-Standard div attributes.

StepperTitle

Title text for the step. Use it inside StepperHeading when title and description should share one interaction background.

PropTypeDefaultDescription
classNamestring-Additional classes for the title.
...propsReact.HTMLAttributes<HTMLHeadingElement>-Standard heading attributes.

StepperDescription

Supporting text for the step. Use it inside StepperHeading with StepperTitle.

PropTypeDefaultDescription
classNamestring-Additional classes for the description.
...propsReact.HTMLAttributes<HTMLParagraphElement>-Standard paragraph attributes.

StepperSeparator

Connector between steps. Separators for previous steps use the brand fill; pending separators use the contextual border color one level above the parent surface.

PropTypeDefaultDescription
classNamestring-Additional classes for position, length, and thickness.
...propsReact.HTMLAttributes<HTMLDivElement>-Standard div attributes.

On this page