Skip to Content

Stepper

A horizontal progress indicator for multi-step workflows. Shows numbered steps with labels and highlights the currently active step.


Import

import { Stepper } from "@phpcreation/frontend-components-react-nextjs-bundle/components/Stepper";

Props

PropTypeRequiredDefaultDescription
activeStepnumberZero-based index of the current step
stepsstring[][]Array of step label strings
localestringLocale for translations

Usage

import { Stepper } from "@phpcreation/frontend-components-react-nextjs-bundle/components/Stepper"; import { useState } from "react"; export default function ImportWizard() { const [step, setStep] = useState(0); const steps = ["Upload File", "Map Columns", "Preview", "Confirm"]; return ( <div> <Stepper activeStep={step} steps={steps} locale="en" /> {/* Step content */} {step === 0 && <UploadStep />} {step === 1 && <MapStep />} {step === 2 && <PreviewStep />} {step === 3 && <ConfirmStep />} <button onClick={() => setStep(s => s + 1)}>Next</button> </div> ); }

Last updated on