# Multi-step form

A controlled native form shell with progress, step review, validation-aware continuation and focus recovery.

Access: pro. Category: Forms. Kind: composite.

## When to use

- Use it when a page needs a controlled native form shell with progress, step review, validation-aware continuation and focus recovery.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.

## Alternatives

- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than multi-step form.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Multi-step form

```sh
npx shadcn@latest add @tidal-pro/multi-step-form
```

Stylesheets: `components/ui/tidal.css`, `components/ui/multi-step-form.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/multi-step-form.css";
import{TidalMultiStepForm}from"./components/ui/multi-step-form";
export default()=><div className="tidal-scope"><TidalMultiStepForm currentStepId={"example"} onStepChange={() => {}} steps={[{id:"example",label:"Demo",title:"Demo",content:"value"}]} title={"Demo"}/></div>;
```

## Structured props

- `TidalMultiStepForm.currentStepId: string`: Required current step id value accepted by this exported component.
- `TidalMultiStepForm.onStepChange: (nextStepId: string, source: TidalMultiStepChangeSource, event: TidalMultiStepChangeEvent) => void`: Callback invoked when the step change interaction is proposed.
- `TidalMultiStepForm.steps: ReadonlyArray<TidalMultiStepFormStep>`: Required steps value accepted by this exported component.
- `TidalMultiStepForm.title: ReactNode`: Required title value accepted by this exported component.
- `TidalMultiStepForm.backButtonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children"> | undefined`: Optional back button props value accepted by this exported component.
- `TidalMultiStepForm.backButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional back button ref value accepted by this exported component.
- `TidalMultiStepForm.busy?: boolean | undefined` (default false): Optional busy value accepted by this exported component.
- `TidalMultiStepForm.continueButtonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, "form" | "type" | "children"> | undefined`: Optional continue button props value accepted by this exported component.
- `TidalMultiStepForm.continueButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional continue button ref value accepted by this exported component.
- `TidalMultiStepForm.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalMultiStepForm.error?: ReactNode`: Optional error value accepted by this exported component.
- `TidalMultiStepForm.eyebrow?: ReactNode`: Optional eyebrow value accepted by this exported component.
- `TidalMultiStepForm.footer?: ReactNode`: Optional footer value accepted by this exported component.
- `TidalMultiStepForm.headingLevel?: "h2" | "h3" | "h4" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalMultiStepForm.labels?: Partial<TidalMultiStepFormLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalMultiStepForm.onFinalSubmit?: ((event: FormEvent<HTMLFormElement>) => void) | undefined`: Callback invoked when the final submit interaction is proposed.
- `TidalMultiStepForm.persistentFields?: ReactNode`: Optional persistent fields value accepted by this exported component.
- `TidalMultiStepForm.stepHeadingLevel?: "h3" | "h4" | "h5" | undefined`: Optional step heading level value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/multi-step-form.tsx) | [Manifest](https://tidalui.com/examples/multi-step-form.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
"use client";

import "./components/ui/tidal.css";

import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState, type FormEvent, type InvalidEvent } from "react";

import { TidalMultiStepForm, type TidalMultiStepFormStep } from "./components/ui/multi-step-form";

import "./components/ui/multi-step-form.css";



const tidalExampleStyles = ".tidal-scope .multi-step-demo,\n.tidal-scope .multi-step-demo * {\n  box-sizing: border-box;\n}\n\n.tidal-scope .multi-step-demo {\n  width: 100%;\n  min-width: 0;\n  border: 1px solid var(--t-border);\n  border-radius: 22px;\n  background: var(--t-subtle);\n  color: var(--t-ink);\n  container: multi-step-demo / inline-size;\n}\n\n.tidal-scope .multi-step-demo-frame {\n  min-width: 0;\n  padding: 20px;\n}\n\n.tidal-scope .multi-step-demo-fields {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  gap: 12px;\n  min-width: 0;\n}\n\n.tidal-scope .multi-step-demo-fields > label {\n  display: grid;\n  min-width: 0;\n  gap: 6px;\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 650;\n  line-height: 1.4;\n}\n\n.tidal-scope .multi-step-demo-fields > label > span,\n.tidal-scope .multi-step-demo-choice-group legend {\n  color: var(--t-ink);\n  font-size: 11px;\n  font-weight: 700;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope\n  .multi-step-demo-fields\n  input:not([type=\"radio\"]):not([type=\"checkbox\"]),\n.tidal-scope .multi-step-demo-fields select {\n  width: 100%;\n  min-width: 0;\n  min-height: 48px;\n  padding: 10px 12px;\n  border: 1px solid var(--t-border);\n  border-radius: 10px;\n  background: var(--t-surface);\n  color: var(--t-ink);\n  font: inherit;\n  font-size: 16px;\n  line-height: 1.4;\n  transition:\n    border-color 180ms,\n    box-shadow 180ms,\n    background 180ms;\n}\n\n.tidal-scope .multi-step-demo-fields input:focus-visible,\n.tidal-scope .multi-step-demo-fields select:focus-visible {\n  border-color: var(--t-ink);\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n  box-shadow: inset 0 0 0 1px var(--t-surface);\n}\n\n.tidal-scope .multi-step-demo-fields small {\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 520;\n  line-height: 1.45;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .multi-step-demo-choice-group {\n  display: grid;\n  min-width: 0;\n  grid-column: 1 / -1;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  gap: 8px;\n  margin: 0;\n  padding: 0;\n  border: 0;\n}\n\n.tidal-scope .multi-step-demo-choice-group legend {\n  grid-column: 1 / -1;\n  margin-bottom: 2px;\n}\n\n.tidal-scope .multi-step-demo-choice-group label,\n.tidal-scope .multi-step-demo-check {\n  position: relative;\n  display: grid;\n  min-width: 0;\n  min-height: 70px;\n  grid-template-columns: 44px minmax(0, 1fr);\n  align-items: center;\n  gap: 10px;\n  padding: 9px 11px;\n  border: 1px solid var(--t-border);\n  border-radius: 12px;\n  background: var(--t-surface);\n  color: var(--t-ink);\n  cursor: pointer;\n  transition:\n    border-color 180ms,\n    background 180ms,\n    transform 180ms var(--t-ease-out);\n}\n\n.tidal-scope .multi-step-demo-check {\n  grid-column: 1 / -1;\n}\n\n.tidal-scope .multi-step-demo-choice-group label:has(input:checked),\n.tidal-scope .multi-step-demo-check:has(input:checked) {\n  border-color: var(--t-ink);\n  background: var(--t-wash);\n}\n\n.tidal-scope .multi-step-demo-choice-group input,\n.tidal-scope .multi-step-demo-check input {\n  width: 44px;\n  height: 44px;\n  margin: 0;\n  accent-color: var(--t-accent);\n  cursor: pointer;\n}\n\n.tidal-scope .multi-step-demo-choice-group label > span,\n.tidal-scope .multi-step-demo-check > span {\n  display: grid;\n  min-width: 0;\n  gap: 4px;\n}\n\n.tidal-scope .multi-step-demo-choice-group strong,\n.tidal-scope .multi-step-demo-check strong,\n.tidal-scope .multi-step-demo-choice-group small,\n.tidal-scope .multi-step-demo-check small {\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .multi-step-demo-choice-group strong,\n.tidal-scope .multi-step-demo-check strong {\n  font-size: 11px;\n  line-height: 1.35;\n}\n\n.tidal-scope .multi-step-demo-review {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  gap: 1px;\n  margin: 0;\n  overflow: hidden;\n  border: 1px solid var(--t-border);\n  border-radius: 14px;\n  background: var(--t-border);\n}\n\n.tidal-scope .multi-step-demo-review > div {\n  min-width: 0;\n  min-height: 76px;\n  padding: 14px;\n  background: var(--t-surface);\n}\n\n.tidal-scope .multi-step-demo-review dt {\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 680;\n  line-height: 1.35;\n}\n\n.tidal-scope .multi-step-demo-review dd {\n  margin: 7px 0 0;\n  color: var(--t-ink);\n  font-size: 12px;\n  font-weight: 640;\n  line-height: 1.35;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .multi-step-demo-footer {\n  display: flex;\n  min-width: 0;\n  align-items: center;\n  justify-content: center;\n  gap: 9px;\n}\n\n.tidal-scope .multi-step-demo-footer > span {\n  min-width: 0;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .multi-step-demo-footer button,\n.tidal-scope .multi-step-demo-complete button {\n  min-width: 44px;\n  min-height: 44px;\n  padding: 9px 13px;\n  border: 1px solid currentColor;\n  border-radius: 10px;\n  background: transparent;\n  color: inherit;\n  font: inherit;\n  font-size: 11px;\n  font-weight: 680;\n  line-height: 1.35;\n  cursor: pointer;\n}\n\n.tidal-scope .multi-step-demo-footer button:focus-visible,\n.tidal-scope .multi-step-demo-complete button:focus-visible,\n.tidal-scope .multi-step-demo-complete h3:focus-visible {\n  outline: 2px solid currentColor;\n  outline-offset: 3px;\n}\n\n.tidal-scope .multi-step-demo-complete {\n  display: grid;\n  min-height: 370px;\n  place-items: center;\n  align-content: center;\n  gap: 10px;\n  text-align: center;\n  background:\n    linear-gradient(var(--t-border) 1px, transparent 1px),\n    linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\n    var(--t-subtle);\n  background-size: 24px 24px;\n}\n\n.tidal-scope .multi-step-demo-complete-mark {\n  display: grid;\n  width: 58px;\n  height: 58px;\n  place-items: center;\n  border-radius: 18px;\n  background: var(--t-ink);\n  color: var(--t-surface);\n  font-size: 21px;\n  animation: multi-step-demo-mark-in 420ms var(--t-ease-spring) both;\n}\n\n.tidal-scope .multi-step-demo-complete > span {\n  margin-top: 6px;\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 700;\n  letter-spacing: 0.1em;\n  text-transform: uppercase;\n}\n\n.tidal-scope .multi-step-demo-complete h3 {\n  max-width: 18ch;\n  margin: 0;\n  font-size: clamp(28px, 7cqi, 48px);\n  font-weight: 530;\n  letter-spacing: -0.055em;\n  line-height: 1;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .multi-step-demo-complete p {\n  max-width: 54ch;\n  margin: 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.55;\n  overflow-wrap: anywhere;\n}\n\n@container multi-step-demo (max-width: 640px) {\n  .tidal-scope .multi-step-demo {\n    border-radius: 18px;\n  }\n\n  .tidal-scope .multi-step-demo-frame {\n    padding: 8px;\n  }\n\n  .tidal-scope .multi-step-demo-fields,\n  .tidal-scope .multi-step-demo-choice-group {\n    grid-template-columns: minmax(0, 1fr);\n  }\n\n  .tidal-scope .multi-step-demo-choice-group legend,\n  .tidal-scope .multi-step-demo-check {\n    grid-column: 1;\n  }\n\n  .tidal-scope .multi-step-demo-review {\n    grid-template-columns: minmax(0, 1fr);\n  }\n\n  .tidal-scope .multi-step-demo-review > div {\n    min-height: 62px;\n  }\n\n  .tidal-scope .multi-step-demo-footer {\n    flex-direction: column;\n  }\n}\n\n@container multi-step-demo (max-width: 390px) {\n  .tidal-scope .multi-step-demo-complete {\n    min-height: 340px;\n    padding: 22px 14px;\n  }\n}\n\n@media (hover: none) and (pointer: coarse) {\n  .tidal-scope .multi-step-demo-footer button,\n  .tidal-scope .multi-step-demo-complete button {\n    font-size: 16px;\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tidal-scope .multi-step-demo-choice-group label,\n  .tidal-scope .multi-step-demo-check {\n    transition: none;\n  }\n\n  .tidal-scope .multi-step-demo-complete-mark {\n    animation: none;\n  }\n}\n\n@keyframes multi-step-demo-mark-in {\n  from {\n    opacity: 0;\n    transform: scale(0.72) rotate(-10deg);\n  }\n  to {\n    opacity: 1;\n    transform: none;\n  }\n}";

type StepId = "workspace" | "preferences" | "review";

type Visibility = "private" | "team";

export function MultiStepFormDemo() {
  const generatedId = useId().replace(/:/g, "");
  const [step, setStep] = useState<StepId>("workspace");
  const [workspaceName, setWorkspaceName] = useState("Northstar studio");
  const [teamSize, setTeamSize] = useState("6-15");
  const [visibility, setVisibility] = useState<Visibility>("team");
  const [weeklySummary, setWeeklySummary] = useState(true);
  const [error, setError] = useState("");
  const [busy, setBusy] = useState(false);
  const [complete, setComplete] = useState(false);
  const [message, setMessage] = useState(
    "This setup preview uses local React state only.",
  );
  const timerRef = useRef<number | null>(null);
  const continueRef = useRef<HTMLButtonElement>(null);
  const completionSourceRef = useRef<HTMLElement | null>(null);
  const nameRef = useRef<HTMLInputElement>(null);
  const completeHeadingRef = useRef<HTMLHeadingElement>(null);
  const resetFocusPending = useRef(false);
  const formName = `multi-step-demo-${generatedId}`;

  useEffect(
    () => () => {
      if (timerRef.current !== null) window.clearTimeout(timerRef.current);
    },
    [],
  );

  useLayoutEffect(() => {
    if (!complete) return;
    const activeElement = document.activeElement;
    if (
      activeElement === completionSourceRef.current ||
      activeElement === document.body
    ) {
      completeHeadingRef.current?.focus({ preventScroll: true });
    }
    completionSourceRef.current = null;
  }, [complete]);

  useLayoutEffect(() => {
    if (!resetFocusPending.current || complete || step !== "workspace") return;
    resetFocusPending.current = false;
    nameRef.current?.focus({ preventScroll: true });
  }, [complete, step]);

  const steps = useMemo<readonly TidalMultiStepFormStep[]>(
    () => [
      {
        id: "workspace",
        label: "Workspace",
        title: "Name the sample workspace",
        description:
          "Use a clear label and a fictional team-size range for this local setup preview.",
        complete: step !== "workspace",
        content: (
          <div className="multi-step-demo-fields">
            <label>
              <span>Workspace name</span>
              <input
                ref={nameRef}
                name="workspaceName"
                value={workspaceName}
                required
                minLength={3}
                autoComplete="organization"
                onChange={(event) => {
                  setWorkspaceName(event.currentTarget.value);
                  setError("");
                }}
              />
              <small>At least three characters. This value is not saved.</small>
            </label>
            <label>
              <span>Fictional team size</span>
              <select
                name="teamSize"
                value={teamSize}
                required
                onChange={(event) => setTeamSize(event.currentTarget.value)}
              >
                <option value="1-5">1–5 people</option>
                <option value="6-15">6–15 people</option>
                <option value="16-40">16–40 people</option>
              </select>
            </label>
          </div>
        ),
      },
      {
        id: "preferences",
        label: "Preferences",
        title: "Choose local preview defaults",
        description:
          "These controls change only the review shown in this browser preview.",
        complete: step === "review",
        content: (
          <div className="multi-step-demo-fields">
            <fieldset className="multi-step-demo-choice-group">
              <legend>Sample workspace access</legend>
              <label>
                <input
                  type="radio"
                  name="visibility"
                  value="private"
                  checked={visibility === "private"}
                  onChange={() => setVisibility("private")}
                />
                <span>
                  <strong>Private sample</strong>
                  <small>Only this preview displays the setting.</small>
                </span>
              </label>
              <label>
                <input
                  type="radio"
                  name="visibility"
                  value="team"
                  checked={visibility === "team"}
                  onChange={() => setVisibility("team")}
                />
                <span>
                  <strong>Team sample</strong>
                  <small>No people are invited or connected.</small>
                </span>
              </label>
            </fieldset>
            <label className="multi-step-demo-check">
              <input
                type="checkbox"
                name="weeklySummary"
                checked={weeklySummary}
                onChange={(event) =>
                  setWeeklySummary(event.currentTarget.checked)
                }
              />
              <span>
                <strong>Show a weekly sample summary</strong>
                <small>No email or notification is sent.</small>
              </span>
            </label>
          </div>
        ),
      },
      {
        id: "review",
        label: "Review",
        title: "Review the local setup",
        description:
          "Finish to show a local completion state. No workspace or account is created.",
        content: (
          <dl className="multi-step-demo-review">
            <div>
              <dt>Workspace</dt>
              <dd>{workspaceName || "Not provided"}</dd>
            </div>
            <div>
              <dt>Team size</dt>
              <dd>{teamSize} people</dd>
            </div>
            <div>
              <dt>Access</dt>
              <dd>
                {visibility === "team" ? "Team sample" : "Private sample"}
              </dd>
            </div>
            <div>
              <dt>Summary</dt>
              <dd>{weeklySummary ? "Shown locally" : "Hidden"}</dd>
            </div>
          </dl>
        ),
      },
    ],
    [step, teamSize, visibility, weeklySummary, workspaceName],
  );

  function handleInvalid(event: InvalidEvent<HTMLFormElement>) {
    const control = event.target as HTMLInputElement | HTMLSelectElement;
    if (control.name === "workspaceName") {
      setError(
        "Enter at least three characters for the sample workspace name.",
      );
    } else {
      setError("Complete the required field before continuing.");
    }
  }

  function finish(event: FormEvent<HTMLFormElement>) {
    event.preventDefault();
    if (busy) return;
    completionSourceRef.current =
      ((event.nativeEvent as SubmitEvent).submitter as HTMLElement | null) ??
      (document.activeElement as HTMLElement | null);
    setBusy(true);
    setError("");
    setMessage("Checking the local sample setup…");
    timerRef.current = window.setTimeout(() => {
      timerRef.current = null;
      setBusy(false);
      setComplete(true);
      setMessage(
        "Sample setup complete in local preview state. Nothing was created or saved.",
      );
    }, 600);
  }

  function cancelCheck() {
    if (timerRef.current !== null) window.clearTimeout(timerRef.current);
    timerRef.current = null;
    setBusy(false);
    setMessage("Local completion check cancelled. No setup was created.");
    requestAnimationFrame(() =>
      continueRef.current?.focus({ preventScroll: true }),
    );
  }

  function reset() {
    if (timerRef.current !== null) window.clearTimeout(timerRef.current);
    timerRef.current = null;
    resetFocusPending.current = true;
    setWorkspaceName("Northstar studio");
    setTeamSize("6-15");
    setVisibility("team");
    setWeeklySummary(true);
    setError("");
    setBusy(false);
    setStep("workspace");
    setComplete(false);
    setMessage("Local sample reset. No saved setup exists.");
    completionSourceRef.current = null;
  }

  if (complete) {
    return (
      <section className="multi-step-demo">
        <div className="multi-step-demo-complete">
          <div className="multi-step-demo-complete-mark" aria-hidden="true">
            ✓
          </div>
          <span>Local preview</span>
          <h3 ref={completeHeadingRef} tabIndex={-1}>
            Sample setup complete
          </h3>
          <p>{message}</p>
          <button type="button" onClick={reset}>
            Adjust sample setup
          </button>
        </div>
      </section>
    );
  }

  return (
    <section className="multi-step-demo" aria-label="Multi-step form preview">
      <div className="multi-step-demo-frame">
        <TidalMultiStepForm
          id={formName}
          title="Workspace setup"
          eyebrow={null}
          description="Enter workspace details, choose preferences, and review."
          steps={steps}
          currentStepId={step}
          onStepChange={(next) => {
            setError("");
            setStep(next as StepId);
            setMessage(`Moved to the ${next} step in local preview state.`);
          }}
          onFinalSubmit={finish}
          onInvalid={handleInvalid}
          onInput={() => setError("")}
          error={error || null}
          busy={busy}
          persistentFields={
            <>
              <input type="hidden" name="workspaceName" value={workspaceName} />
              <input type="hidden" name="teamSize" value={teamSize} />
              <input type="hidden" name="visibility" value={visibility} />
              <input
                type="hidden"
                name="weeklySummary"
                value={weeklySummary ? "shown" : "hidden"}
              />
            </>
          }
          continueButtonRef={continueRef}
          footer={
            <div className="multi-step-demo-footer">
              <span role="status" aria-live="polite">
                {message}
              </span>
              {busy ? (
                <button type="button" onClick={cancelCheck}>
                  Cancel local check
                </button>
              ) : null}
            </div>
          }
        />
      </div>
    </section>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <MultiStepFormDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

title, unique consumer-owned steps, currentStepId and onStepChange are required. Each step supplies id, label, title and content, with optional description, optional/complete state, panel attributes and ref. A native progress element and visible ordered step rail expose the controlled position. Intermediate native submit events run browser constraint validation before the controlled Continue transition; the final step preserves native form action/method and submitter overrides unless onFinalSubmit prevents submission. Back and Continue preserve native button attributes, dedicated refs, caller click prevention, explicit aria-disabled false and 44px targets. An accepted internal Back/Continue transition within one second moves focus once to the new labelled panel only while the source still owns focus; a declined or superseded transition clears its pending intent without stealing focus later. Optional persistentFields accepts consumer-owned type=hidden mirrors so final native FormData can include values from unmounted prior steps. Optional error, busy, footer, root/step heading levels, labels and native form attributes/ref are consumer-owned. Busy keeps the submit control focusable with aria-disabled. The component owns no field values, validation policy, account, request, network, storage or completion outcome.
