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

Steps

steps

Communicates progress and status across an ordered multi-step process.

Usage

Basic usage

items provides a title/description and current specifies the current step - previous steps are automatically marked as complete.

  1. Submit applicationFill in the reimbursement document
  2. 2Department ApprovalAmount reviewed by supervisor
  3. 3Financial paymentCorporate transfer
  4. 4CompleteArchived and closed
tsx
const items = [
  { title: "Submit application", description: "Fill in reimbursement document" },
  { title: "Department Approval", description: "Supervisor Review Amount" },
  { title: "Financial transfer", description: "Business transfer" },
  { title: "Complete", description: "Archive and close" },
];

<Steps items={items} current={1} />

Error status

status="error" Mark the current step in red, indicating that the step failed to verify or was rejected.

  1. Submit applicationFill in the reimbursement document
  2. Department ApprovalAmount reviewed by supervisor
  3. Financial paymentCorporate transfer
  4. 4CompleteArchived and closed
tsx
<Steps items={items} current={2} status="error" />

Vertical orientation

direction="vertical" Arrange vertically, suitable for side rails or narrow containers.

  1. Submit applicationFill in the reimbursement document
  2. Department ApprovalAmount reviewed by supervisor
  3. 3Financial paymentCorporate transfer
  4. 4CompleteArchived and closed
tsx
<Steps direction="vertical" items={items} current={2} />

Small size

size="sm" Tighten the indicator and text, suitable for dense middle and backend layout.

  1. Submit applicationFill in the reimbursement document
  2. 2Department ApprovalAmount reviewed by supervisor
  3. 3Financial paymentCorporate transfer
  4. 4CompleteArchived and closed
tsx
<Steps size="sm" items={items} current={1} />

Clickable + Controlled

After inputting onChange, each step can be clicked, and cooperate with useState to realize the previous/next step navigation.

tsx
function Wizard() {
  const [current, setCurrent] = useState(1);
  return (
    <div className="flex flex-col gap-5">
      <Steps items={items} current={current} onChange={setCurrent} />
      <div className="flex gap-2">
        <Button variant="outline" size="sm" disabled={current === 0}
          onClick={() => setCurrent((c) => c - 1)}> Previous </Button>
        <Button size="sm" disabled={current === items.length - 1}
          onClick={() => setCurrent((c) => c + 1)}>Next </Button>
      </div>
    </div>
  );
}

When to use

Use Steps to show progress through a multistep form, order lifecycle, or approval flow. It supports horizontal and vertical layouts, derived or explicit states, clickable controlled navigation, descriptions, and custom icons. Stepper is a lightweight progress display; choose Steps for richer workflows.

Import

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

Props

NameTypeDefaultDescription
items*StepsItem[]-Step data described below.
currentnumber0Zero-based current step used to derive each item's state.
status"process" | "finish" | "error""process"State assigned to the item whose index equals current.
direction"horizontal" | "vertical""horizontal"Layout direction.
size"sm" | "md""md"Component size.
classNamestring-Additional class name.

The list uses the built-in Chinese aria-label "\u6b65\u9aa4", meaning “Steps.”

StepsItem

FieldTypeDescription
title*ReactNodeStep title.
descriptionReactNodeSecondary copy below the title.
iconReactNodeCustom indicator replacing the default number or status icon.
status"wait" | "process" | "finish" | "error"Explicit item state overriding the state derived from current.
disabledbooleanPrevents selection and reduces opacity.

Events

EventTypeDescription
onChange(index: number) => voidWhen provided, makes steps clickable and reports the index of a selected non-disabled item.

Example

tsx
const ORDER = [
  { title: "Submit", description: "Complete the expense form" },
  { title: "Department approval", description: "Manager reviews the amount" },
  { title: "Payment", description: "Finance sends the transfer" },
  { title: "Complete", description: "Archive the case" },
];

// Static progress
<Steps items={ORDER} current={1} />

// Clickable and controlled
const [current, setCurrent] = useState(1);
<Steps items={ORDER} current={current} onChange={setCurrent} />

Usage guidelines

  • By default, indices below current derive finish, the current index derives status (process by default), and later indices derive wait. Set StepsItem.status to override one item.
  • Items become clickable only when onChange is provided. Selecting a disabled item does not call the callback.

Related

Tabs · Breadcrumb · Pagination · Anchor · Affix · BackTop

Playground

  1. Submit applicationFill in the reimbursement document
  2. 2Department ApprovalAmount reviewed by supervisor
  3. 3Financial paymentCorporate transfer
  4. 4CompleteArchived and closed
<Steps
  current={1}
  items={[
    { title: "Submit application", description: "Fill in reimbursement document" },
    { title: "Department Approval", description: "Supervisor Review Amount" },
    { title: "Financial transfer", description: "Business transfer" },
    { title: "Complete", description: "Archive and close" },
  ]}
/>
PreviousStepperNavigationNextPageHeader

On this page

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