Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Global Navigation

  • Navbar
  • BeianFooter
  • Brand
  • AppLauncher
  • Sidebar
  • NavMenu
  • NavigationMenu
  • Menu
  • Menubar
  • Dock
  • BubbleMenu
  • CardNav
  • FlowingMenu
  • GooeyNav
  • PillNav
  • StaggeredMenu

In-page Navigation

  • RouteTabs
  • Tabs
  • Breadcrumb
  • Pagination
  • Anchor
  • Affix
  • BackTop
  • Stepper
  • Steps
  • PageHeader

Actions and Tools

  • Command
  • ContextMenu
  • Toolbar
  • Accordion
  • Collapsible
  • Link
  • AnimatedThemeToggler

Stepper

stepper

Displays connected process steps with completed checks and an accessible current-step marker.

Usage

Basic usage

Input steps array and controlled activeStep (0-based), the current step and the previous step will be automatically lit.

  1. Place an order
  2. 2
    Payment
  3. 3
    Shipping
  4. 4
    Complete
tsx
const steps = [
  { label: "Place an order" },
  { label: "Payment" },
  { label: "Shipping" },
  { label: "Complete" },
];

<Stepper steps={steps} activeStep={1} />

First step

When activeStep=0, only the first step is active, and the rest are unreached.

  1. 1
    Place an order
  2. 2
    Payment
  3. 3
    Shipping
  4. 4
    Complete
tsx
<Stepper steps={steps} activeStep={0} />

Completed

activeStep When equal to the number of steps, all steps are completed (check mark + main color connection).

  1. Place an order
  2. Payment
  3. Shipping
  4. Complete
tsx
<Stepper steps={steps} activeStep={4} />

When to use

Use Stepper for a minimal horizontal progress indicator controlled by steps and activeStep. Choose Steps when you need vertical layout, clickable steps, descriptions, custom icons, or explicit status. Stepper is the lighter option for display-only progress.

Import

ts
import { Stepper } from "@hulianui/ui"

Props

NameTypeDefaultDescription
steps*StepItem[]-Steps in the shape { label: ReactNode }.
activeStep*number-Controlled zero-based current step. A value at least steps.length marks every step complete.
classNamestring-Additional class name.

StepItem

NameTypeDefaultDescription
label *ReactNode-Step text.

The progress container has the built-in Chinese aria-label "\u6b65\u9aa4\u8fdb\u5ea6", meaning “Step progress.”

Example

tsx
const steps = [{ label: "Order" }, { label: "Payment" }, { label: "Shipping" }, { label: "Complete" }];

<Stepper steps={steps} activeStep={1} />

Usage guidelines

  • activeStep is controlled and zero-based. An index below it is complete and an equal index is active. Pass activeStep={steps.length} to represent full completion.
  • The API is intentionally limited to steps and activeStep. Use Steps for vertical orientation, click-to-jump behavior, descriptions, or custom icons.
  • State hooks are aria-current="step" and data-state="completed|active|pending", not MUI's .Mui-active class.

Related

Tabs · Breadcrumb · Pagination · Anchor · Affix · BackTop

Playground

  1. Place an order
  2. 2
    Payment
  3. 3
    Shipping
  4. 4
    Complete
<Stepper steps={steps} activeStep={1} />
PreviousBackTopNavigationNextSteps

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Example
    • Usage guidelines
    • Related
  • Playground