Client component

Steps

Multi-step flows with derived statuses, error states and built-in wizard navigation.

  1. 1

    Account

  2. 2

    Shipping

  3. 3

    Confirm

Email and password.

Import#

import { Steps } from "astralis-ui";
// Steps.List, .Item, .Indicator, .Title, .Description,
// .Content, .Completed, .Prev, .Next

Usage#

Each item's status (completed, active, upcoming, error) is derived from the active index; indicators show a number, a check, or an error mark accordingly. Steps.Prev/Steps.Next come pre-wired with end-of-flow disabling, and Steps.Completed renders after the final step.

Variants#

solid
  1. Completed

    Done

  2. 2

    Active

  3. 3

    Upcoming

subtle
  1. Completed

    Done

  2. 2

    Active

  3. 3

    Upcoming

dot
  1. Completed

    Done

  2. Active

  3. Upcoming

Vertical with descriptions#

Vertical orientation suits timelines and long flows; error on an item flags it without breaking the sequence.

  1. Completed

    Repository created

    astralis/astralis-ui

  2. !Error

    CI failed

    error marks a step red

  3. 3

    Fix and re-run

    You are here

  4. 4

    Deploy

    Upcoming

Clickable with bottom labels#

clickable turns indicators into jump buttons (linear restricts jumping ahead); labelPlacement="bottom" centers titles under the track.

  1. Cart

  2. Payment

  3. Receipt

Props#

PropTypeDefaultDescription
step · defaultStep · onStepChangenumber · number · (step: number) => voidNone · 0 · NoneControlled / initial step (0-based), and the change callback.
variant"solid" | "subtle" | "dot""solid"Filled circles, outlined circles, or minimal dots.
size"sm" | "md" | "lg""md"Indicator and typography scale together.
orientation"horizontal" | "vertical""horizontal"Step layout direction.
labelPlacement"inline" | "bottom""inline"Horizontal only: titles beside or centered beneath indicators.
clickablebooleanfalseIndicators become buttons that jump to their step.
linearbooleanfalseRestricts navigation to one step forward, no skipping ahead.
countnumberNoneTotal steps; usually auto-counted from Steps.List children.

Parts#

PropTypeDefaultDescription
Steps.Itemdisabled?: boolean · error?: booleanNoneOne step; status (completed/active/upcoming/error) is derived from the active index.
Steps.Indicatorchildren?: ReactNodeNoneCircle/dot: shows the number, a check when completed, or ! on error. Children override.
Steps.Title / Steps.DescriptionchildrenNoneLabels that recolor with the step's status.
Steps.Contentindex: numberNonePanel shown while its index is active.
Steps.CompletedchildrenNoneShown once the flow advances past the last step.
Steps.Prev / Steps.Nextchildren?: ReactNode · disabled?: boolean"Back" / "Next"Navigation buttons with automatic disabling at the ends.

Accessibility#

  • The list is a real ol; the active indicator carries aria-current="step".
  • Connectors are decorative (aria-hidden); statuses are exposed as data attributes for styling.
  • Prev/Next are plain buttons. Keyboard access comes for free.