Step Invalidation

Step Invalidation is a copy-paste React component that stops earlier wizard change broke later steps before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/step-invalidation
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsEarlier wizard change broke later steps

Was this component page useful?

How do I install Step Invalidation?

pnpm dlx shadcn@latest add @bollard/step-invalidation

The files land in your project. They're yours to edit.

How do I use Step Invalidation in React?

step-invalidation-usage.tsx
import { StepInvalidationNav, StepInvalidationNotice, StepInvalidationRail, invalidatedFieldClass, useStepInvalidation, type WizardStep, } from "@/components/ui/step-invalidation"

<StepInvalidationNav wizard={wizard} onFinish={() => setFinished(true)} />

What input mistakes does Step Invalidation catch?

  • Later answers a change would clear or trim, grouped by step
  • Steps needing review, marked in the stepper
  • Finish attempted before affected steps are checked
  • Changing the answer back, which restores what was removed

What props does Step Invalidation accept?

StepInvalidationRail props
PropTypeDefault
wizard* (required)

The wizard state returned by the hook.

Wizard<T>—
staleHint

Read after a step that needs another look.

string"needs another look"

* required. Also accepts the native props of <ol> (className, aria-*, data-*…), passed through to it.

How is Step Invalidation accessible?

  • Stepper buttons use aria-current="step" and aria-labels that include the stale hint
  • Impact message is role=status (polite)
  • Keep, change and review are labelled buttons; icons are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Dependencies are what you declare in the wizard config
  • Restore works within the session; it isn't persisted

What expensive mistakes does Step Invalidation stop?

Earlier wizard change broke later steps

Also known as

wizard · stepper · multi-step form · onboarding · plan selection · dependent steps · configurator

What dependencies does Step Invalidation require?

Step Invalidation facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameStep Invalidation
Registry identifier@bollard/step-invalidation
Install commandnpx shadcn@latest add @bollard/step-invalidation
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Step Invalidation

What form validation mistake does Step Invalidation catch?

Step Invalidation prevents earlier wizard change broke later steps. Says which later wizard answers an earlier change will clear before it applies, then walks back through only those steps. Catches: Later answers a change would clear or trim, grouped by step, Steps needing review, marked in the stepper, Finish attempted before affected steps are checked, Changing the answer back, which restores what was removed. Limitation: validate step-invalidation schemas on backend.

How do I install step-invalidation with shadcn?

Run `npx shadcn@latest add @bollard/step-invalidation`. Sources added: registry/default/step-invalidation/step-invalidation.tsx. Package requirements: lucide-react.

What props customize Step Invalidation?

Step Invalidation accepts `wizard`, `staleHint`. Configures wizard, stepper, multi-step form behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of step-invalidation?

Dependencies are what you declare in the wizard config. Restore works within the session; it isn't persisted Server requirement: backend verification for step-invalidation.

How does Step Invalidation meet accessibility guidelines?

Stepper buttons use aria-current="step" and aria-labels that include the stale hint. Impact message is role=status (polite). Keep, change and review are labelled buttons; icons are aria-hidden. Minimizes errors: changed step 1 broke step 3, wizard answers cleared.

Which components pair with Step Invalidation?