Getting StartedInstall and bootstrap headless foundations 4
LayoutHeadless structural primitives for expandable and container patterns 6
OverlayHeadless modal and floating layer behavior 3
FeedbackHeadless notification and status communication patterns 5
FormHeadless input and selection contracts 17
UtilityReusable action, identity, and clipboard behavior 6
NavigationHeadless trails, trees, menus, and command surfaces 7

Styling

Headless stepper mirrors root, item, trigger, connector, and panel state through stable data attributes. You own spacing, icons, connector lines, panels, and all visual density.

Slot and state hooks

SelectorWho owns itTypical use
[data-slot="stepper"]LibraryRoot spacing, orientation, linear mode, and wrapper-level layout.
[data-slot="stepper-item"]LibraryStep row visuals keyed by data-state, data-optional, and index.
[data-slot="stepper-trigger"]LibraryFocusable trigger styling, focus rings, disabled affordances, and current emphasis.
[data-slot="stepper-connector"]LibraryConnector lines or progress rails between steps.
[data-state]Librarycurrent, completed, upcoming, disabled, or error.

CSS starter

Headless stepper starter CSS

css
[data-slot="stepper"] {
  display: grid;
  gap: 0.75rem;
}

[data-slot="stepper-item"] {
  border: 1px solid var(--tng-semantic-border-subtle);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

[data-slot="stepper-trigger"] {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  gap: 0.5rem;
}

[data-slot="stepper-trigger"]:focus-visible {
  outline: 2px solid var(--tng-semantic-accent-brand);
  outline-offset: 3px;
}

[data-slot="stepper-item"][data-state="current"] {
  border-color: var(--tng-semantic-accent-brand);
}

[data-slot="stepper-item"][data-state="completed"] {
  border-color: var(--tng-semantic-accent-success);
}

[data-slot="stepper-item"][data-state="error"] {
  border-color: var(--tng-semantic-accent-danger);
}

Practical guidance

  • Prefer data-state for styling and aria-current="step" for semantic checks.
  • Use data-step-index only for generated counters or connector math.
  • Style aria-disabled="true" triggers as blocked without removing readable labels.
  • Keep panel animations tied to [data-slot="stepper-panel"][data-state].