使用 Steps 组件来展示一系列按顺序进行的操作或事件。你可以根据需要添加任意数量的步骤。
1

First Step

以下内容仅适用于第一步的说明或操作。
2

Second Step

以下内容仅适用于第二步的说明或操作。
3

Third Step

以下内容仅适用于第三步的说明或操作。
Steps example
<Steps>
  <Step title="First Step">
    These are instructions or content that only pertain to the first step.
  </Step>
  <Step title="Second Step">
    These are instructions or content that only pertain to the second step.
  </Step>
  <Step title="Third Step">
    These are instructions or content that only pertain to the third step.
  </Step>
</Steps>

Steps 属性

children
ReactElement<StepProps>[]
required
Step 组件列表。
titleSize
string
default:"p"
步骤标题的字号。可选值:ph2h3

单个步骤属性

children
string | ReactNode
required
步骤的内容,可为纯文本或组件。
icon
string
要显示的图标。可选值:
  • Font Awesome 图标 的名称
  • Lucide 图标 的名称
  • 用花括号包裹的、与 JSX 兼容的 SVG 代码
  • 指向外部托管图标的 URL
  • 项目中图标文件的路径
自定义 SVG 图标:
  1. 使用 SVGR 转换器将 SVG 转换。
  2. 将 SVG 代码粘贴到 SVG 输入框。
  3. 从 JSX 输出框复制完整的 <svg>...</svg> 元素。
  4. 用花括号包裹 JSX 兼容的 SVG 代码:icon={<svg ...> ... </svg>}
  5. 按需调整 heightwidth
iconType
string
Font Awesome 图标样式。仅在使用 Font Awesome 图标时使用。可选值:regularsolidlightthinsharp-solidduotonebrands
title
string
标题是该步骤的主要文本,显示在指示器旁。
stepNumber
number
步骤序号。
titleSize
string
default:"p"
步骤标题的字号。可选值:ph2h3