React Form Wizard
Feature demos

Accessibility

Two wizards on one page. Click into either, then use the arrow keys — only the focused one responds.

Click into either wizard, then use Home End. Only the focused wizard moves. Tabs also activate with Enter and Space.

Form wizard with 3 steps. Currently on step 1.

Wizard A

Step 1 of 3: A1
First panel of A
Form wizard with 3 steps. Currently on step 1.

Wizard B

Step 1 of 3: B1
First panel of B

Code

AccessibleWizards.tsx
"use client";

import React from "react";
import FormWizard from "react-form-wizard-component";
import "react-form-wizard-component/styles.css";

export default function AccessibleWizards() {
  return (
    <>
      <p className="aw-note">
        Click into either wizard, then use <kbd>←</kbd> <kbd>→</kbd>{" "}
        <kbd>Home</kbd> <kbd>End</kbd>. Only the focused wizard moves. Tabs also
        activate with <kbd>Enter</kbd> and <kbd>Space</kbd>.
      </p>

      <div className="aw-grid">
        <FormWizard title="Wizard A" ariaLabel="Wizard A">
          <FormWizard.TabContent title="A1">First panel of A</FormWizard.TabContent>
          <FormWizard.TabContent title="A2">Second panel of A</FormWizard.TabContent>
          <FormWizard.TabContent title="A3">Third panel of A</FormWizard.TabContent>
        </FormWizard>

        <FormWizard title="Wizard B" ariaLabel="Wizard B">
          <FormWizard.TabContent title="B1">First panel of B</FormWizard.TabContent>
          <FormWizard.TabContent title="B2">Second panel of B</FormWizard.TabContent>
          <FormWizard.TabContent title="B3">Third panel of B</FormWizard.TabContent>
        </FormWizard>
      </div>

      <style>{`
        .aw-note { color: #5c6968; font-size: 14px; }
        .aw-grid {
          display: grid; gap: 24px;
          grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        }
      `}</style>
    </>
  );
}

On this page