Manta Developers
GitHub
Menu

@manta-eu/react/stepper

Reference for @manta-eu/react/stepper as it is on main.

Type Aliases

StepperOrientation

StepperOrientation = "horizontal" | "vertical"


StepperProps

StepperProps = object

Properties

canSelectStep?

optional canSelectStep?: (index) => boolean

Which steps are selectable; finished ones by default.

Parameters
index

number

Returns

boolean

caption?

optional caption?: boolean

className?

optional className?: string

compact?

optional compact?: boolean

Markers only; horizontal steppers go compact below 30rem anyway.

completeLabel?

optional completeLabel?: string

current

current: number

Index of the current step; steps.length when all are done.

label?

optional label?: string

notStartedLabel?

optional notStartedLabel?: string

onStepSelect?

optional onStepSelect?: (index) => void

Makes finished steps selectable; without it the stepper only shows progress.

Parameters
index

number

Returns

void

orientation?

optional orientation?: StepperOrientation

previousStep?

optional previousStep?: number

The step shown before mount, such as on the last page; fills on from there.

started?

optional started?: boolean

False before the flow starts: every step waits.

stepOfLabel?

optional stepOfLabel?: (step, count) => string

Announces the current step’s place; “Step 2 of 4” by default.

Parameters
step

number

count

number

Returns

string

steps

steps: StepperStep[]


StepperStatus

StepperStatus = "complete" | "current" | "upcoming" | "error"


StepperStep

StepperStep = object

Properties

description?

optional description?: string

error?

optional error?: string

Marks the step failed; replaces the description.

icon?

optional icon?: ReactNode

Replaces the step’s number; finished steps still show the check.

id

id: string

Stable across renders, so each step keeps its motion.

label

label: string

status?

optional status?: StepperStatus

For steps that don’t finish in order; follows current by default.

Functions

Stepper()

Stepper(props): Element

Parameters

props

StepperProps

Returns

Element