WizardSteps
Step indicator plus selectable option cards with state.
Wraps: none (native inputs + theme tokens)
Step 1 of 3 · Products
Use it
Examples import from the package. With copied source, import from @/components/ui/wizard-steps instead.
import { OptionCards, WizardSteps } from "@zedtech/zedkit-ui";
const [picked, setPicked] = useState(["a", "b"]);
<WizardSteps steps={["Pick", "Configure", "Test"]} current={0} />
<OptionCards options={options} selected={picked} onChange={setPicked} />Composed steps
- Cart
- Delivery
- Payment
- Confirmation
Checkout: payment is the current step; the confirmation comes after.
import { Wizard, WizardStep } from "@zedtech/zedkit-ui";
<Wizard>
<WizardStep step="Pick" index={0} state="done" showConnector />
<WizardStep step="Configure" index={1} state="current" />
</Wizard>Solo card
You will receive the digest.
import { OptionCard } from "@zedtech/zedkit-ui";
const [solo, setSolo] = useState(false);
<OptionCard title="Solo option" checked={solo} onChange={() => setSolo(!solo)} />Pick one
Delivery: Standard.
import { OptionCards } from "@zedtech/zedkit-ui";
const [delivery, setDelivery] = useState(["standard"]); // always one id
<OptionCards multiple={false} label="Delivery" options={options} selected={delivery} onChange={setDelivery} />Kit not installed yet?
Install
Terminal pnpm add @zedtech/zedkit-ui @fontsource-variable/inter @fontsource-variable/space-groteskLoad the styles
Tailwind does not scan node_modules, so the @source line points it at the kit's class names. The path is relative to this file.
src/app/globals.cssReplace the contents@import "tailwindcss"; @import "@zedtech/zedkit-ui/styles.css"; @source "../../node_modules/@zedtech/zedkit-ui/src/**/*.{ts,tsx}"; @source not "../../node_modules/@zedtech/zedkit-ui/src/**/*.test.*";Pick a look
Set data-identity="glass" on <html> so the finished app matches the site. Fresh app: replace src/app/layout.tsx. Existing app: merge, and keep ThemeProvider and other providers.
src/app/layout.tsxReplace the contentsimport "./globals.css"; import "./fonts"; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <html lang="en" data-identity="glass"> <body>{children}</body> </html> ); }Load the fonts
The Glass look uses Inter and Space Grotesk; these imports self-host them.
src/app/fonts.tsCreate the fileimport "@fontsource-variable/inter"; import "@fontsource-variable/space-grotesk";Import and render
src/app/page.tsxReplace the contentsimport { Wizard, WizardStep } from "@zedtech/zedkit-ui"; export default function Page() { return ( <main className="px-page-gutter py-section-sm"> <Wizard> <WizardStep step="Pick" index={0} state="done" showConnector /> <WizardStep step="Configure" index={1} state="current" /> </Wizard> </main> ); }
Package version 2.0.1.
Props
Prop
Type
Accessibility
List carries aria-label="Progress"; current step gets aria-current="step". Cards are native checkboxes in labels; with multiple={false} they are native radios in a radiogroup, one name per group, arrow keys move the choice.
Troubleshooting
Steps stuck done/todo — `current` is a 0-based index; past the last step everything reads done. Missing connector — composed `WizardStep` rows show one only with `showConnector` (automatic in `WizardSteps`).