Steps
A navigation bar that guides users through the steps of a task.
When To Use
When a given task is complicated or has a certain sequence in the series of subtasks, we can decompose it into several steps to make things easier.
Examples
-
Basic ·
simple -
Error status ·
error -
Vertical ·
vertical -
Clickable ·
clickable -
Panel Steps ·
panel -
With icon ·
icon -
Title Placement and Progress ·
title-placement -
Max Count ·
max-count -
Dot Style ·
progress-dot -
Navigation Steps ·
nav -
Inline Steps ·
inline -
Inline Style Combination ·
inline-variant -
Custom semantic dom styling ·
style-class
API
Common props ref:Common props
Steps
The whole of the step bar.
| Property | Description | Type | Default | Version | Global Config |
|---|---|---|---|---|---|
| classNames | Customize class for each semantic structure inside the component. Supports object or function. | Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string> | - | 6.0.0 | |
| current | To set the current step, counting from 0. You can overwrite this state by using status of Step | number | 0 | × | |
To specify the direction of the step bar, horizontal or vertical | string | horizontal | × | ||
| iconRender | Custom render icon, please use items.icon first | (oriNode, info: { index, active, item }) => ReactNode | - | × | |
| initial | Set the initial step, counting from 0 | number | 0 | × | |
Place title and content with horizontal or vertical direction | string | horizontal | × | ||
| maxCount | Maximum number of step items to display (>= 3). Hidden ranges are collapsed into disabled ellipsis steps. | number | - | × | |
| orientation | To specify the orientation of the step bar, horizontal or vertical | string | horizontal | × | |
| percent | Progress circle percentage of current step in process status (only works on basic Steps) | number | - | 4.5.0 | × |
Steps with progress dot style, customize the progress dot by setting it to a function. Please use type="dot" instead. titlePlacement will be vertical | boolean | (iconDot, { index, status, title, content }) => ReactNode | false | × | ||
| responsive | Change to vertical direction when screen width smaller than 532px | boolean | true | × | |
| size | To specify the size of the step bar, medium and small are currently supported | string | medium | × | |
| status | To specify the status of current step, can be set to one of the following values: wait process finish error | string | process | × | |
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties> | - | 6.0.0 | |
| titlePlacement | Place title and content with horizontal or vertical direction | string | horizontal | × | |
| type | Type of steps, can be set to one of the following values: default dot inline navigation panel | string | default | × | |
| variant | Config style variant | filled | outlined | filled | × | |
| onChange | Trigger when Step is changed | (current) => void | - | × | |
| items | StepItem content | StepItem | [] | 4.24.0 | × |
StepItem
A single step in the step bar.
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| content | Description of the step, optional property | ReactNode | - | |
| Description of the step, optional property | ReactNode | - | ||
| disabled | Disable click | boolean | false | |
| icon | Icon of the step, optional property | ReactNode | - | |
| status | To specify the status. It will be automatically set by current of Steps if not configured. Optional values are: wait process finish error | string | wait | |
| subTitle | Subtitle of the step | ReactNode | - | |
| title | Title of the step | ReactNode | - |
Semantic DOM
Steps
| Semantic node | Native description | Version |
|---|---|---|
root | Root element with flex layout, nowrap, alignment, CSS variables and other basic step container styles | — |
item | Step item element with flex layout, relative positioning and other basic step item container styles | — |
itemWrapper | Step item wrapper element with flex layout, nowrap, top padding and other step content wrapping styles | — |
itemIcon | Step item icon element with icon size, positioning, font-size and other icon display related styles | — |
itemHeader | Step item header element with flex layout, nowrap, alignment and other header area layout styles | — |
itemTitle | Step item title element with color, font-size, line-height, word-break, transitions and other title text styles | — |
itemSubtitle | Step item subtitle element with color, font-weight, font-size, line-height, margin, word-break and other subtitle styles | — |
itemSection | Step item section element with step content area layout and styling | — |
itemContent | Step item content element with color, font-size, line-height, word-break, transitions and other content text styles | — |
itemRail | Step item rail element with border-style, border-width, transitions and other connecting line styles | — |
Semantic description source: vendor/components/steps/demo/_semantic.tsx
StepItem
| Semantic node | Native description | Version |
|---|---|---|
root | Root element | — |
wrapper | Step item wrapper element | — |
icon | Step item icon element | — |
header | Step item header element | — |
title | Step item title element | — |
subtitle | Step item subtitle element | — |
section | Step item section element | — |
content | Step item content element | — |
rail | Step item rail element | — |
Semantic description source: vendor/components/steps/demo/_semantic_items.tsx
Design Token
Types, inheritance and declarations retain the pinned native source. Defaults are computed by the native theme and may be overridden by ConfigProvider; this table does not invent static defaults.
| Token | Type | Native description |
|---|---|---|
descriptionMaxWidth? | number | Max width of description area |
customIconSize | number | Size of custom icon container |
customIconTop | number | Top of custom icon |
customIconFontSize | number | Font size of custom icon |
iconSize | number | Size of icon container |
iconTop | number | Top of icon |
iconFontSize | number | Size of icon |
dotSize | number | Size of dot |
dotCurrentSize | number | Current size of dot |
navArrowColor | string | Color of arrow in nav |
navContentMaxWidth | CSSProperties['maxWidth'] | Max width of nav content |
iconSizeSM | number | string | Size of small steps icon |
titleLineHeight | number | string | Line height of title |
Declaration source: vendor/components/steps/style/index.ts
import type { CSSProperties } from 'react';
import type { CSSObject } from '@ant-design/cssinjs';
import { genFocusOutline, resetComponent, textEllipsis } from '../../style';
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
import { genStyleHooks, mergeToken } from '../../theme/internal';
import { genCssVar } from '../../theme/util/genStyleUtils';
import genHorizontalStyle from './horizontal';
import genIconStyle from './icon';
import genInlineStyle from './inline';
import genLabelPlacementStyle from './label-placement';
import genMaxCountStyle from './max-count';
import genLegacyNavStyle from './nav';
import genPanelStyle from './panel';
import genStepsProgressStyle from './progress';
import genDotStyle from './progress-dot';
import genRTLStyle from './rtl';
import genSmallStyle from './small';
import genStatusStyle from './status';
import genVerticalStyle from './vertical';
export interface ComponentToken {
/**
* @desc 描述区域最大宽度
* @descEN Max width of description area
* @deprecated This value has been removed by default since v6
*/
descriptionMaxWidth?: number;
/**
* @desc 自定义图标容器尺寸
* @descEN Size of custom icon container
*/
customIconSize: number;
/**
* @desc 自定义图标 top
* @descEN Top of custom icon
*/
customIconTop: number;
/**
* @desc 自定义图标大小
* @descEN Font size of custom icon
*/
customIconFontSize: number;
/**
* @desc 图标容器尺寸
* @descEN Size of icon container
*/
iconSize: number;
/**
* @desc 图标 top
* @descEN Top of icon
*/
iconTop: number;
/**
* @desc 图标大小
* @descEN Size of icon
*/
iconFontSize: number;
/**
* @desc 点状步骤点大小
* @descEN Size of dot
*/
dotSize: number;
/**
* @desc 点状步骤点当前大小
* @descEN Current size of dot
*/
dotCurrentSize: number;
/**
* @desc 可跳转步骤条箭头颜色
* @descEN Color of arrow in nav
*/
navArrowColor: string;
/**
* @desc 可跳转步骤条内容最大宽度
* @descEN Max width of nav content
*/
navContentMaxWidth: CSSProperties['maxWidth'];
/**
* @desc 小号步骤条图标大小
* @descEN Size of small steps icon
*/
iconSizeSM: number | string;
/**
* TODO: deprecated warning since not used anymore
* @desc 标题行高
* @descEN Line height of title
* @deprecated Not used anymore
*/
titleLineHeight: number | string;
}
export interface StepsToken extends FullToken<'Steps'> {
inlineDotSize: number;
}
Shared native props
Tips: The following generic properties apply to most antd components; those not supported are described separately.
| Property | Description | Type | Default |
|---|---|---|---|
| style | The additional style | CSSProperties | - |
| className | The additional css class | string | - |
| rootClassName | ClassName on the root element | string | - |
| autoFocus | Auto focus when component mounted, only effective for focusable elements like forms, links, etc. | boolean | false |
Install and reproduce an example
npm install antd@6.6.5 @ant-design/icons@6.3.4 dayjs@1.11.23
Use ConfigProvider and native App; configure dayjs locale separately. Each example lists its complete source files and additional pinned dependencies in View code. Example names select demos, not universal component props. See the resource setup guide for theme, locale and SSR.
Native type references
The source viewer includes unchanged native implementations and the following source declarations. Inherited types remain in their native packages. English source comments are preserved as code reference.
vendor/components/steps/PanelArrow.tsxvendor/components/steps/ProgressIcon.tsxvendor/components/steps/context.tsvendor/components/steps/index.tsxvendor/components/steps/style/index.tsvendor/components/steps/useDisplaySteps.ts
Source and license
https://github.com/ant-design/ant-design/tree/4a39f54842eade4e565ab336ef6097cd7e723cdd
Original bilingual prose and executable examples are retained. Website-only embeds and token tables are expanded locally. Ant Design is MIT; separately listed dependency notices also apply. Upload previews block outbound requests and do not provide a backend.