Skip to content

HyStep

Usage examples on this page are written for Lit / plain HTML (<hy-step>). The same component ships as HyStep in @whitespaceux/harmony-react (native React 19), with typed wrappers for Angular, Solid, Svelte, and Vue. The API reference below applies to all frameworks.

A single step within an hy-stepper. Presentational by design — it carries the indicator metadata (label, description, icon, optional, disabled) that the parent reads to render the step rail, and exposes a default slot for the content shown when this step is the active one. Non-active steps hide their content (display: none).

The status property is owned by the parent hy-stepper — it derives completed / active / upcoming from active-step on every change. The one status you set yourself is error: author status="error" (or set it imperatively) and the parent preserves it through derivation, so a step stays flagged until you clear it. There is no separate error boolean — status="error" is the single source of truth.

Examples

Within a stepper

html
<hy-stepper active-step="1">
  <hy-step label="Account" description="Your details">
    <p>Account form…</p>
  </hy-step>
  <hy-step label="Shipping" description="Where to send it">
    <p>Shipping form…</p>
  </hy-step>
  <hy-step label="Review" optional>
    <p>Review &amp; submit…</p>
  </hy-step>
</hy-stepper>

API

Properties

PropertyAttributeTypeDefaultDescription
labellabelstring''The step's title, shown in the rail and used as the content's accessible name.
descriptiondescriptionstring''Optional secondary line shown beneath the label in the rail.
statusstatus'upcoming' | 'active' | 'completed' | 'error''upcoming'The step's status. Owned by the parent hy-stepper (derived from active-step), except error, which you set and the parent preserves.
iconiconstring''Custom indicator icon name. When unset the rail shows the step number, a check (completed), or a warning (error).
disableddisabledbooleanfalseDisables the step, making it non-navigable.
optionaloptionalbooleanfalseRenders an "Optional" caption beneath the label in the rail.
contentIdstring''Stable id for the content region — referenced by the parent's rail button name sync.

Slots

SlotDescription
defaultContent shown when this step is the active step.

CSS Parts

PartDescription
baseThe step's content container.

CSS Custom Properties

PropertyDescription
--hy-step-paddingInner padding of the content container. Default: var(--hy-padding-container-md).
--hy-step-radiusCorner radius of the content container. Default: var(--hy-radius-container-md).
--hy-step-backgroundBackground of the content container. Default: var(--hy-background-surface-subtle).
--hy-step-border-colorBorder color of the content panel. Default: var(--hy-background-brand-rest) — always the brand fill; the per-status cue lives in the rail indicator, not this border.
--hy-step-foregroundText color of the content container. Default: var(--hy-foreground-default-rest).

Built with Lit. Documented with VitePress.