StepperItem

The StepperItem component represents a page component used within a Stepper container.

NOTE

  • This component is supported since API version 8 and deprecated since API version 22. You are advised to use Swiper instead.

Updates will be marked with a superscript to indicate their earliest API version.

Child Components

This component supports only one child component.

APIs

StepperItem()

Creates a page component for the Stepper container.

NOTE

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

Attributes

prevLabel(deprecated)

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.

NOTE

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(deprecated)

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.

NOTE

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(deprecated)

status(value?: ItemState)

Sets the display status of nextLabel in the stepper.

NOTE

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

NOTE

  • The StepperItem component does not support setting of the universal width attribute. By default, its width is the same as that of the parent Stepper component.
  • The StepperItem component does not support setting of the universal height attribute. Its height is the height of the parent Stepper component minus the height of the label button.
  • The StepperItem component does not support setting dimension-affecting attributes such as aspectRatio or constraintSize.

ItemState

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.

Example

See Stepper.