Skip to main content

Stepper: React

Steppers let a user know what their current position is in a series of steps.

Installation

Before you can start using the @mediahuis/chameleon-react component, you’ll need to install it, for more information check: Getting started for developers.

With that done, you’re now ready to implement the component in your application.

import { Stepper } from '@mediahuis/chameleon-react';

export default function Example() {
return <Stepper steps={['step1', 'step2', 'step3']} />;
}

Properties

PropertyTypeDefaultRequiredDescription
accessibilityLabelActiveString'Current: 'NoThe label that will be read by screen readers when a step is active.
accessibilityLabelCompletedString'Completed: 'NoThe label that will be read by screen readers when a step is completed.
activeStepIndexNumber0NoThe index of the currently active step.
stepsUnknown[]YesAn array containing the labels of all the steps to be shown.