Step Timeline

View registry JSON

An expanding step selector with timed progress and accessible manual navigation.

Install with the shadcn CLI

npx shadcn@4.21.5 add @cavemio/step-timeline
First install? Configure @cavemio once

Run npx shadcn@4.21.5 init if shadcn is not set up, then merge this entry into the registries field in your existing components.json. Keep your other settings and registries.

components.json
{
  "registries": {
    "@cavemio": "https://registry.cavemio.dev/r/cavemio-{name}.json"
  }
}

Overview

An expanding step selector with timed progress and accessible manual navigation.

An expanding stage selector with controlled selection and optional autoplay.

import { StepTimeline } from "@/components/step-timeline";

<StepTimeline steps={steps} value={stage} onValueChange={setStage} />

Props

PropTypeDescription
stepsreadonly TimelineStep[]Required. Nonempty steps with unique, stable IDs.
valuestringOptional. Controlled selected step ID.
defaultValuestringOptional. Initial selection when uncontrolled.
onValueChange(value: string) => voidOptional. Called when the selection changes.
autoPlaybooleanOptional. Opt in to timed progression.
durationnumberOptional. Duration of each timeline step in milliseconds.
disabledbooleanOptional. Disable user interaction.
ariaLabelstringOptional. Accessible name for the component.
classNamestringOptional. Additional CSS classes for the root element.
styleCSSPropertiesOptional. Inline styles for the root element.
Step Timeline · Cavemio