Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-wizard.json --yes

Wizard

Pro

A flow the user goes through one step at a time, with back and next buttons, for React and Tailwind CSS. Part of Goop Pro.

Make a workspace in three steps. Continue with an empty name, a malformed address or a taken one (fieldwork, team, home) is refused with the reason on the step; a wrong email on the second step too. Back keeps what was typed; Create saves for a moment and ends on a finished state; Start again. Switch the head to the compact progress row. The taken addresses are a list of three and the save is a timer; nothing is created or sent.

When to use

  • A flow the user goes through one step at a time, with back and next buttons.
  • Also called: multi-step form or stepper.

When not to use

  • To only show where someone is in a flow, use Steps.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Wizard on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-wizard.json --yes
PROMPT
Add the Goop Wizard to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Wizard, WizardHeader, WizardPanel, WizardFooter, WizardPrevious, WizardNext, WizardIndicator } from '@/components/ui/goop/wizard';
import { useState } from 'react';
import { Alert, AlertTitle } from '@/components/ui/goop/alert';
import { Field } from '@/components/ui/goop/field';
import { TextInput } from '@/components/ui/goop/text-input';

function ImportFlow() {
  const [step, setStep] = useState('file');
  const [file, setFile] = useState('');
  const [tried, setTried] = useState(false);
  return (
    <Wizard
      aria-label="Import notes"
      steps={[
        { value: 'file', label: 'File', complete: file !== '' },
        { value: 'check', label: 'Check' },
      ]}
      value={step}
      onValueChange={setStep}
    >
      <WizardHeader label="Import steps" />
      <WizardPanel
        value="file"
        title="Choose a file"
        alert={tried && !file ? <Alert variant="destructive"><AlertTitle>Name a file to import</AlertTitle></Alert> : null}
      >
        <ul>
          <Field as="li" label="File name">
            <TextInput value={file} onChange={(event) => setFile(event.target.value)} aria-invalid={tried && !file} />
          </Field>
        </ul>
      </WizardPanel>
      <WizardPanel value="check" title="Check the notes" description="Each file becomes one note." />
      <WizardFooter>
        <WizardPrevious />
        <WizardNext
          finishLabel="Import"
          onClick={(event) => {
            if (step !== 'file' || file) return;
            event.preventDefault();
            setTried(true);
          }}
        />
      </WizardFooter>
    </Wizard>
  );
}
  • Fits: flow (its recipe).
  • To refuse a move (Continue pressed while the step has errors), call event.preventDefault() in WizardNext's onClick: the step stays, neither onValueChange nor onFinish is called, and that press shows why, in the step's alert and with aria-invalid on each refused field. When the flow can open at any step (a link, a saved draft, an Edit button), give each steps entry complete from what was filled, or every earlier step reads as done. A controlled wizard also stays put when its onValueChange does not pass the new value back.
  • width, padding, gap, corner, border: add no class for these.

API reference

Options
OptionTypeWhat it does
stepsReadonlyArray<WizardStep>The flow as data, in order: each step's value, its label and complete.
value?stringThe current step's value, when the caller holds it (with onValueChange).
defaultValue?stringThe step shown first when the caller does not hold it.
onValueChange?(value: string) => voidHears every move with the new step's value; a controlled wizard moves only when its caller passes it.
  • State: value (value / defaultValue / onValueChange)
  • Types: WizardStep = { value: string; label: string; complete?: boolean }
Parts
PartWhat it is
WizardHeaderThe step strip at the top of a wizard, naming each step; use it or WizardIndicator, never both; its props: wizard--header.md
WizardPanelOne step's content (title, description, fields); write one per step, matched to it by value; its props: wizard--panel.md
WizardFooterThe row for WizardPrevious and WizardNext; write it once, as a direct child of the Wizard; its props: wizard--footer.md
WizardPreviousThe back button, first in WizardFooter; it goes one step back and hides on the first step; its props: wizard--previous.md
WizardNextThe forward button, last in WizardFooter; on the last step it finishes the flow; its props: wizard--next.md
WizardIndicatorThe flow's overall progress as a compact header, IN PLACE OF the WizardHeader (one or the other, never both); its props: wizard--indicator.md

WizardIndicator

The flow's overall progress as a compact header, IN PLACE OF the WizardHeader (one or the other, never both).

TSX
import { WizardIndicator } from '@/components/ui/goop/wizard';

Options

  • label?: string = 'Progress' — The bar's name, read by assistive technology.
  • className?: string — Classes added to the row holding the caption and the bar.
  • children?: string — The caption's words; "2/4" by default.

WizardPanel

One step's content (title, description, fields); write one per step, matched to it by value.

TSX
import { WizardPanel } from '@/components/ui/goop/wizard';

Options

  • value: string — The step this panel shows: a value of the wizard's steps.
  • title: ReactNode — The step's title, a heading that names the panel.
  • headingLevel?: 2 | 3 | 4 | 5 | 6 = 3 — The title's heading level, one under the heading the wizard stands under.
  • description?: ReactNode — A line under the title.
  • alert?: ReactNode — The caller's Alert before the fields: what needs a change before the step is left.
  • className?: string — Classes added to the panel round the step's card.
  • children?: ReactNode — The step's fields: a list of the theme's Field rows.

Keyboard

KeyWhat it does
TabMove through the step's fields and the foot's buttons
EnterPress the focused button

Accessibility

  • The part itself answers the keys above.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/wizard.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-wizard.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.