Steps 步骤条
引导用户按流程完成任务,支持横向 / 纵向、可点击导航、整体状态覆盖。
基础用法
基础用法
- 勾稿确定构图与线条
- 晕染分层晕开墨色
- 设色点染丹青之色
- 题款落款钤印成画
- 勾稿
- 晕染
- 设色此处需返工
- 题款
- 勾稿确定构图与线条
- 晕染分层晕开墨色
- 设色
- 题款
import { useState } from 'react'
import { LhSteps, LhStep } from '@lh-ui/react'
export default function Demo() {
const [current, setCurrent] = useState(1)
return (
<LhSteps current={current} onChange={(index) => setCurrent(index)}>
<LhStep title="勾稿" description="确定构图与线条" />
<LhStep title="晕染" description="分层晕开墨色" />
<LhStep title="设色" description="点染丹青之色" />
<LhStep title="题款" description="落款钤印成画" />
</LhSteps>
)
}
Steps Props
| 属性 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| current | 当前步骤索引(0 起,受控) | number | — | — |
| defaultCurrent | 当前步骤默认值(非受控) | number | — | 0 |
| direction | 方向 | 'horizontal' | 'vertical' | — | 'horizontal' |
| clickable | 步骤是否可点击导航 | boolean | — | false |
| status | 整体覆盖所有步骤的状态(用于自定义展示) | 'wait' | 'process' | 'finish' | 'error' | — | — |
| themeVars | 组件级主题变量(键自动加 --lh- 前缀) | Record<string, string> | — | — |
| sx | 快速布局属性 | SxProps | — | — |
Step Props
| 属性 | 说明 | 类型 |
|---|