The StepperItem component represents a page component used within a Stepper container.
Updates will be marked with a superscript to indicate their earliest API version.
StepperItem()
Creates a page component for the Stepper container.
This API is supported since API version 8 and deprecated since API version 22. You are advised to use Swiper instead.
Atomic service API: This API can be used in atomic services since API version 11.
System capability: SystemCapability.ArkUI.ArkUI.Full
prevLabel(value: string)
Sets the text label of the button on the left, which is not displayed on the first page. When the Stepper contains more than one page, the default value for all pages except the first page is Back.
This API is supported since API version 8 and deprecated since API version 22. You are advised to use showPrevious instead.
Atomic service API: This API can be used in atomic services since API version 11.
System capability: SystemCapability.ArkUI.ArkUI.Full
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| value | string | Yes | Text label of the button on the left. When the string is too long, it is scaled down, wrapped in two lines, and then clipped. |
nextLabel(value: string)
Sets the text label of the button on the right. The default value is Start for the last page and Next for the other pages.
This API is supported since API version 8 and deprecated since API version 22. You are advised to use showNext instead.
Atomic service API: This API can be used in atomic services since API version 11.
System capability: SystemCapability.ArkUI.ArkUI.Full
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| value | string | Yes | Text label of the button on the right. When the string is too long, it is scaled down, wrapped in two lines, and then clipped. |
status(value?: ItemState)
Sets the display status of nextLabel in the stepper.
This API is supported since API version 8 and deprecated since API version 22. You are advised to use indicatorInteractive instead.
Atomic service API: This API can be used in atomic services since API version 11.
System capability: SystemCapability.ArkUI.ArkUI.Full
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| value | ItemState | No | Display status of nextLabel in the stepper. Default value: ItemState.Normal |
Display status of nextLabel in the stepper.
Atomic service API: This API can be used in atomic services since API version 11.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| Normal | 0 | The button on the right is clickable and can navigate users to the next StepperItem when it is clicked. NOTE This API is supported since API version 8 and deprecated since API version 22. You are advised to use index instead. |
| Disabled | 1 | The button on the right is disabled. NOTE This API is supported since API version 8 and deprecated since API version 22. You are advised to use indicatorInteractive instead. |
| Waiting | 2 | The button on the right is not displayed, and a progress bar is displayed instead. NOTE This API is supported since API version 8 and deprecated since API version 22. You are advised to use Swiper instead. |
| Skip | 3 | The button on the right reads "Skip" by default. You can define the processing logic for this state in the onSkip callback of the stepper. NOTE This API is supported since API version 8 and deprecated since API version 22. You are advised to use index instead. |