Tabler React 2 Docs

Steps

Steps

Steps are used to display a series of steps to communicate a process or workflow.

Signature

import { Steps } from "tabler-react-2";
<Steps {...props} />;

Props

PropRequiredTypeDefaultDescription
stepsYesStepListAn array of step objects.
variantNoColorThe color of the steps.
colorNoColorThe color of the steps. Alias of variant
numberedNoBooleanfalseWhether to display the steps as numbered.
hideTextNoBooleanfalseWhether to hide the text of the steps.
verticalNoBooleanfalseWhether to display the steps vertically.

Basic Usage

<Steps steps={[
{ text: "Step 1" },
{ text: "Step 2" },
{ text: "Step 3" }
]} />

StepList

The steps prop is an array of step objects. Each step object can have the following properties:

PropRequiredTypeDescription
texttrueStringThe text to display inside the step.
tooltipfalseStringThe tooltip description for the step.
activefalseBoolWhether the step is active.
hreffalseStringThe href of the step.
onClickfalseFunctionThe onClick function of the step.

You can use the href or onClick props to make steps links or clickable.

<Steps steps={[
{ text: "Step 1", href: "#" },
{ text: "Step 2", href: "#" },
{ text: "Step 3", onClick: () => alert("You clicked on step 3!") }
]} />

Progress

You can set an active attribute on a step. Steps after the active step will be greyed out, and the active step will be bold.

<Steps
steps={[
{ text: "Step 1" },
{ text: "Step 2", active: true },
{ text: "Step 3" },
]}
/>

Colors & Variants

Steps can be colored using Bold Colors. Semantic, light, and brand colors do not work.

<Steps
color="blue"
steps={[{ text: "Step 1" }, { text: "Step 2" }, { text: "Step 3" }]}
/>
<Steps
color="yellow"
steps={[{ text: "Step 1" }, { text: "Step 2" }, { text: "Step 3" }]}
/>

Numbered Steps

You can include a number in the circle on the timeline of the steps by passing the numbered prop

<Steps
numbered
steps={[{ text: "Step 1" }, { text: "Step 2" }, { text: "Step 3" }]}
/>

Vertical Steps

You can change the direction.

<Steps
vertical
steps={[{ text: "Step 1" }, { text: "Step 2" }, { text: "Step 3" }]}
/>

Hide Text

You can hide the text on each step with the hideText attribute.

<Steps
hideText
steps={[{ text: "Step 1" }, { text: "Step 2" }, { text: "Step 3" }]}
/>
<Steps
hideText
numbered
steps={[{ text: "Step 1" }, { text: "Step 2" }, { text: "Step 3" }]}
/>
Edit this page on GitHub