目录

ArkUI_NodeAttributeType (Scrollable Container Component Attribute)

enum ArkUI_NodeAttributeType

Overview

Enumerates the attribute types that can be set by ArkUI on the native side for scrollable container components including the Scroll, List, ListItem, ListItemGroup, Refresh, WaterFlow, Grid, GridItem, ArcList, ArcListItem, and ArcScrollBar components.

Since: 12

Related module: ArkUI_NativeModule

Header file: native_node.h

NODE_SCROLL_BAR_DISPLAY_MODE

NODE_SCROLL_BAR_DISPLAY_MODE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SCROLL = 1002000

Scrollbar display mode. This attribute can be set, reset, and obtained as required through APIs. List, Scroll, and WaterFlow support this attribute since API version 12, and Grid supports this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode. The default value is ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO for the List, Grid, and Scroll components, and ARKUI_SCROLL_BAR_DISPLAY_MODE_OFF for the WaterFlow component.

Returns

Type Description
.value[0].i32 Scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode.

NODE_SCROLL_BAR_WIDTH

NODE_SCROLL_BAR_WIDTH = 1002001

Width of the scrollbar. This attribute can be set, reset, and obtained as required through APIs. List, Scroll, and WaterFlow support this attribute since API version 12, and Grid supports this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32

Width of the scrollbar, in vp. The default value is 4.

Value range: [0, +∞). If the value is less than 0, the default value is used. For kids' smartwatches, the default value is restored to 5 vp. The value 0 means not to show the scrollbar.

Returns

Type Description
.value[0].f32 Width of the scrollbar, in vp.

NODE_SCROLL_BAR_COLOR

NODE_SCROLL_BAR_COLOR = 1002002

Color of the scrollbar. This attribute can be set, reset, and obtained as required through APIs. List, Scroll, and WaterFlow support this attribute since API version 12, and Grid supports this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.data[0].u32 Color of the scrollbar, in 0xARGB format. The default value for kids' smartwatches is 0xffffffff, indicating white (100% non-transparent). For other devices, the default value is 0x66182431, indicating dark blue-gray (40% non-transparent).

Returns

Type Description
.data[0].u32 Color of the scrollbar, in 0xARGB format.

NODE_SCROLL_SCROLL_DIRECTION

NODE_SCROLL_SCROLL_DIRECTION = 1002003

Scroll direction. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Scroll direction. The parameter type is ArkUI_ScrollDirection. The default value is ARKUI_SCROLL_DIRECTION_VERTICAL.

Returns

Type Description
.value[0].i32 Scroll direction. The parameter type is ArkUI_ScrollDirection.

NODE_SCROLL_EDGE_EFFECT

NODE_SCROLL_EDGE_EFFECT = 1002004

Effect used at the edges of the component when the boundary of the scrollable content is reached. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect. The default value is ARKUI_EDGE_EFFECT_NONE for the Grid, Scroll, and WaterFlow components, and ARKUI_EDGE_EFFECT_SPRING for the List component.
.value[1]?.i32 Whether to enable the scroll effect when the component content size is smaller than the component itself. This parameter is optional. The value 1 means to enable the scroll effect, and 0 means the opposite. The default value is 0 for List, Grid, and WaterFlow, and 1 for Scroll.
.value[2]?.i32

Direction where the edge effect takes effect. The parameter type is ArkUI_EffectEdge. The default value is ARKUI_EFFECT_EDGE_START | ARKUI_EFFECT_EDGE_END.

This parameter is supported since API version 16.

Returns

Type Description
.value[0].i32 Effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect.
.value[1].i32 Whether the scroll effect is enabled when the component content size is smaller than the component itself. The value 1 indicates that the scroll effect is enabled, and 0 indicates the opposite.
.value[2].i32 Direction where the edge effect takes effect. The parameter type is ArkUI_EffectEdge. This parameter is supported since API version 16.

NODE_SCROLL_ENABLE_SCROLL_INTERACTION

NODE_SCROLL_ENABLE_SCROLL_INTERACTION = 1002005

Whether to support scroll gestures. When this attribute is set to 0, scrolling by finger or mouse is not supported, but the scrolling controller API is not affected.

The List, Scroll, and WaterFlow components support this attribute since API version 12, and the Grid component supports this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether to support scroll gestures. The default value is 1. The value 1 means to support, and 0 means the opposite.

Returns

Type Description
.value[0].i32 Whether scroll gestures are supported. The value 1 means scroll gestures are supported, and 0 means the opposite.

NODE_SCROLL_FRICTION

NODE_SCROLL_FRICTION = 1002006

Friction coefficient. It applies only to gestures in the scrolling area, and it only indirectly affects the scroll chaining during the inertial scrolling process.

The List, Scroll, and WaterFlow components support this attribute since API version 12, and the Grid component supports this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Friction coefficient. The default value is 0.6 for non-wearable devices and 0.9 for wearable devices. Value range: (0, +∞). If this parameter is set to a value less than or equal to 0, the default value is used.

Returns

Type Description
.value[0].f32 Friction coefficient.

NODE_SCROLL_SNAP

NODE_SCROLL_SNAP = 1002007

Scroll snapping mode of the Scroll component. This attribute can be set, reset, and obtained as required through APIs. If both swipe-to-turn-pages and scroll snapping are set, scroll snapping takes effect first, and swipe-to-turn-pages does not take effect.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Alignment mode for scroll snapping in the Scroll component. The parameter type is ArkUI_ScrollSnapAlign. The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.
.value[1].i32 Whether to enable the snap to start feature. When scroll snapping is defined for the Scroll component, setting this parameter to 0 (false) allows the component to scroll between the start edge and the first page, and setting to 1 (true) prevents the component from scrolling between the start edge and the first page. The default value is 1 (true). It is valid only when there are two or more snap points.
.value[2].i32 Whether to enable the snap to end feature. When scroll snapping is defined for the Scroll component, setting this parameter to 0 (false) allows the component to scroll between the last page and the end edge, and setting to 1 (true) prevents the component from scrolling between the last page and the end edge. The default value is 1 (true). It is valid only when there are two or more snap points.
.value[3...].f32 Snap points for the Scroll component. Each snap point defines the offset from an edge to which the Scroll component can scroll. Unit: vp. One or more snap points are supported.

Returns

Type Description
.value[0].i32 Alignment mode for scroll snapping in the Scroll component. The parameter type is ArkUI_ScrollSnapAlign.
.value[1].i32 Whether the snap to start feature is enabled. When scroll snapping is defined for the Scroll component, if this parameter is set to 0 (false), the component can scroll between the start edge and the first page; if this parameter is set to 1 (true), the component cannot scroll between the start edge and the first page. The default value is 1 (true). It is valid only when there are two or more snap points.
.value[2].i32 Whether the snap to end feature is enabled. When scroll snapping is defined for the Scroll component, if this parameter is set to 0 (false), the component can scroll between the last page and the end edge; if this parameter is set to 1 (true), the component cannot scroll between the last page and the end edge. The default value is 1 (true). It is valid only when there are two or more snap points.
.value[3...].f32 Snap points for the Scroll component. Each snap point defines the offset from an edge to which the Scroll component can scroll. Unit: vp.

NODE_SCROLL_NESTED_SCROLL

NODE_SCROLL_NESTED_SCROLL = 1002008

Nested scrolling attribute, which can be set, reset, and obtained as required through APIs. The List, Scroll, and WaterFlow components support this attribute since API version 12, and the Grid component supports this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Nested scrolling behavior when the scrollable component scrolls toward the end edge. The parameter type is ArkUI_ScrollNestedMode.
.value[1].i32 Nested scrolling behavior when the scrollable component scrolls toward the start edge. The parameter type is ArkUI_ScrollNestedMode.

Returns

Type Description
.value[0].i32 Nested scrolling behavior when the scrollable component scrolls toward the end edge. The parameter type is ArkUI_ScrollNestedMode.
.value[1].i32 Nested scrolling behavior when the scrollable component scrolls toward the start edge. The parameter type is ArkUI_ScrollNestedMode.

NODE_SCROLL_OFFSET

NODE_SCROLL_OFFSET = 1002009

Position to scroll to for the Scroll component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Horizontal scrolling offset, in vp. Value range: [0, +∞). Values less than 0 are treated as 0. If the value is 0, the component scrolls to the start position. If the value is greater than 0, the component scrolls to the specified offset position.
.value[1].f32 Vertical scrolling offset, in vp. Value range: [0, +∞). Values less than 0 are treated as 0. If the value is 0, the component scrolls to the start position. If the value is greater than 0, the component scrolls to the specified offset position.
.value[2]?.i32 Scrolling duration, in milliseconds. The default value is 1000. This parameter is optional. The scrolling with animation effect is enabled when the scrolling duration is greater than 0 or the default spring animation is enabled.
.value[3]?.i32 Scrolling curve. The parameter type is ArkUI_AnimationCurve. This parameter is optional. The default value is ARKUI_CURVE_EASE.
.value[4]?.i32 Whether to enable the default spring animation. This parameter is optional. The default value is 0, indicating not to enable the default spring animation.
.value[5]?.i32 Whether to convert the scroll animation to an overshoot animation when the boundary is reached. The default value is 0, meaning not to convert the scroll animation to an overshoot animation when the boundary is reached. This parameter is optional.
.value[6]?.i32 Whether the component can stop at an overscrolled position. The default value is 0, meaning that the component cannot stop at an overscrolled position. This parameter is optional. This parameter is supported since API version 20.

Returns

Type Description
.value[0].f32 Horizontal scrolling offset, in vp.
.value[1].f32 Vertical scrolling offset, in vp.

NODE_SCROLL_EDGE

NODE_SCROLL_EDGE = 1002010

Edge position to scroll to for the Scroll component. This attribute can be set and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Edge position to scroll to. The parameter type is ArkUI_ScrollEdge.

Returns

Type Description
.value[0].i32 Whether the container is at the edge. The value -1 indicates that the container is not at the edge. If the container is at the edge, the parameter type is ArkUI_ScrollEdge.

NODE_SCROLL_ENABLE_PAGING

NODE_SCROLL_ENABLE_PAGING = 1002011

Whether to enable the swipe-to-turn-pages feature. This attribute can be set, reset, and obtained as required through APIs. If both enablePaging and scrollSnap are set, scrollSnap takes effect preferentially, and enablePaging does not take effect.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether to enable the swipe-to-turn-pages feature. The default value is 0. 0: disable; 1: enable.

Returns

Type Description
.value[0].i32 Whether the swipe-to-turn-pages feature is enabled. 0: The swipe-to-turn-pages feature is disabled; 1: The swipe-to-turn-pages feature is enabled.

NODE_SCROLL_PAGE

NODE_SCROLL_PAGE = 1002012

Scrolls to the next or previous page.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Paging direction. The value 0 means to scroll to the next page, and 1 means to scroll to the previous page.
.value[1]?.i32 Whether to enable the page-turning animation. The value 1 means to enable the page turning animation, and 0 means the opposite. The default value is 0.

NODE_SCROLL_BY

NODE_SCROLL_BY = 1002013

Scrolling distance. The List, Scroll, and WaterFlow components support this attribute since API version 12. The Grid component supports this attribute since API version 26.0.0.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Horizontal scrolling distance, in vp.
.value[1].f32 Vertical scrolling distance, in vp.

NODE_SCROLL_FLING

NODE_SCROLL_FLING = 1002014

Performs inertial scrolling based on the initial velocity passed in.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 13

Parameters

Name Description
.value[0].f32 Initial velocity of inertial scrolling. The unit is vp/s. If the value specified is 0, it is considered as invalid, and the scrolling for this instance will not take effect. If the value is positive, the scroll will move downward; if the value is negative, the scroll will move upward.

NODE_SCROLL_FADING_EDGE

NODE_SCROLL_FADING_EDGE = 1002015

Edge fade effect for the scrollable component.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 14

Parameters

Name Description
.value[0].i32 Whether to enable the edge fade effect. 0: Disable the edge fade effect. 1: Enable the edge fade effect. The default value is 0.
.value[1]?.f32

Length of the fading edge effect. The unit is vp. The default value is 32.

Value range: the value must be greater than or equal to 0. The setting takes effect only when the fading edge effect is enabled.

Returns

Type Description
.value[0].i32 Whether the edge fade effect is enabled. 0: The edge fade effect is disabled. 1: The edge fade effect is enabled.
.value[1].f32 Length of the edge fade effect. The unit is vp.

NODE_SCROLL_SIZE

NODE_SCROLL_SIZE = 1002016

Total size of all child components when fully expanded in the scrollable component.

The format of the return value ArkUI_AttributeItem is as follows.

Since: 14

Returns

Type Description
.value[0].f32 Total width of all child components when fully expanded in the scrollable component. The default unit is vp.
.value[1].f32

Total height of all child components when fully expanded in the scrollable component. The default unit is vp.

When NODE_PADDING, NODE_MARGIN, or NODE_BORDER_WIDTH is set, the values are rounded to the nearest pixel when being converted from vp to px. The return values are calculated based on these rounded pixel values.

NODE_SCROLL_CONTENT_START_OFFSET

NODE_SCROLL_CONTENT_START_OFFSET = 1002017

Offset from the start of the content of the scrollable component. List supports this attribute since API version 15, and Grid, Scroll, and WaterFlow support this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.value[0].f32 Offset from the start of the content, in vp. Default value: 0. Value range: [0, +∞). If set to a negative value, it is treated as 0.

Returns

Type Description
.value[0].f32 Offset from the start of the content, in vp.

NODE_SCROLL_CONTENT_END_OFFSET

NODE_SCROLL_CONTENT_END_OFFSET = 1002018

Offset from the end of the content of the scrollable component. List supports this attribute since API version 15, and Grid, Scroll, and WaterFlow support this attribute since API version 22.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.value[0].f32 Offset from the end of the content, in vp. Default value: 0. Value range: [0, +∞). When set to a negative value, it is treated as 0.

Returns

Type Description
.value[0].f32 Offset from the end of the content, in vp.

NODE_SCROLL_FLING_SPEED_LIMIT

NODE_SCROLL_FLING_SPEED_LIMIT = 1002019

Maximum initial velocity at the start of the fling animation that occurs after gesture-driven scrolling ends. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 18

Parameters

Name Description
.value[0].f32 Maximum initial velocity at the start of the fling animation, in vp/s. The default value is 9000 for non-wearable devices and 5000 for wearable devices. Value range: (0, +∞). If the value is set to less than or equal to 0, the default value is used.

Returns

Type Description
.value[0].f32 Maximum initial velocity at the start of the fling animation.

NODE_SCROLL_CLIP_CONTENT

NODE_SCROLL_CLIP_CONTENT = 1002020

Content clipping area for the scrollable component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 18

Parameters

Name Description
.value[0].i32 Content clipping mode. The parameter type is ArkUI_ContentClipMode. The default value is ARKUI_CONTENT_CLIP_MODE_BOUNDARY for Grid and Scroll, and ARKUI_CONTENT_CLIP_MODE_CONTENT_ONLY for List and WaterFlow.

Returns

Type Description
.value[0].i32 Content clipping mode. The parameter type is ArkUI_ContentClipMode.

NODE_SCROLL_BACK_TO_TOP

NODE_SCROLL_BACK_TO_TOP = 1002021

Whether to scroll back to the top when the status bar is clicked for the scrollable component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.value[0].i32 Whether to scroll back to the top. The value 1 means to scroll back to the top, and 0 means to stay at the current position. The default value is 0 for API versions earlier than 18. The default value for API version 18 and later is as follows: 0 for the horizontal scroll direction, and 1 for the vertical scroll direction.

Returns

Type Description
.value[0].i32 Whether scrolling back to the top is supported. The value 1 means to scroll back to the top, and 0 means to stay at the current position.

NODE_SCROLL_BAR_MARGIN

NODE_SCROLL_BAR_MARGIN = 1002022

Margin of the scrollbar. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].f32 Margin of the scrollbar. The default value is 42 for kids' smartwatches and 0 for other devices. The unit is vp.
.value[1].f32 End margin of the scrollbar, in vp. The default value is 0.

Returns

Type Description
.value[0].f32 Start margin of the scrollbar, in vp.
.value[1].f32 End margin of the scrollbar, in vp.

NODE_SCROLL_MAX_ZOOM_SCALE

NODE_SCROLL_MAX_ZOOM_SCALE = 1002023

Maximum zoom scale for scrollable content.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].f32

Maximum zoom scale for scrollable content. The default value is 1.

Value range: (0, +∞). If the value is less than or equal to 0, the default value is used.

Returns

Type Description
.value[0].f32 Maximum zoom scale for scrollable content.

NODE_SCROLL_MIN_ZOOM_SCALE

NODE_SCROLL_MIN_ZOOM_SCALE = 1002024

Minimum zoom scale for scrollable content.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].f32

Minimum zoom scale for scrollable content. The default value is 1.

Value range: (0, NODE_SCROLL_MAX_ZOOM_SCALE]. If the value is less than or equal to 0, the default value 1 is used. If the value is greater than NODE_SCROLL_MAX_ZOOM_SCALE, NODE_SCROLL_MAX_ZOOM_SCALE is used.

Returns

Type Description
.value[0].f32 Minimum zoom scale for scrollable content.

NODE_SCROLL_ZOOM_SCALE

NODE_SCROLL_ZOOM_SCALE = 1002025

Zoom scale for scrollable content.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].f32

Zoom scale for scrollable content. The default value is 1.

Value range: (0, +∞). If the value is less than or equal to 0, the default value is used.

Returns

Type Description
.value[0].f32 Zoom scale for scrollable content.

NODE_SCROLL_ENABLE_BOUNCES_ZOOM

NODE_SCROLL_ENABLE_BOUNCES_ZOOM = 1002026

Whether to enable the zoom bounce effect when the scaling exceeds the limits.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].i32 Whether to enable the zoom bounce effect when the scaling exceeds the limits. The value 1 means to enable the effect, and 0 means the opposite. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the zoom bounce effect is enabled when the scaling exceeds the limits. The value 1 means that the effect is enabled, and 0 means the opposite.

NODE_SCROLL_ENABLE_SCROLL_WITH_MOUSE

NODE_SCROLL_ENABLE_SCROLL_WITH_MOUSE = 1002027

Whether to support scroll using the left button on the mouse. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to support scroll using the left button on the mouse. The value 1 indicates to support, and 0 indicates the opposite. The default value is 0.

Returns

Type Description
.value[0].i32 Whether scroll using the left button on the mouse is supported. The value 1 indicates scroll using the left button on the mouse is supported, and 0 indicates the opposite.

NODE_SCROLL_AUTO_ADJUST_MARGIN

NODE_SCROLL_AUTO_ADJUST_MARGIN = 1002028

Whether the scrollbar automatically adjusts its margin to avoid the area of the NODE_PADDING, NODE_SCROLL_CONTENT_START_OFFSET, or NODE_SCROLL_CONTENT_END_OFFSET component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether the scrollbar automatically adjusts its margin. The value 0 indicates that the scrollbar automatically adjusts its margin, and 1 indicates the opposite. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the scrollbar automatically adjusts its margin. The value 0 indicates that the scrollbar automatically adjusts its margin, and 1 indicates the opposite.

NODE_SCROLL_BAR_HEIGHT

NODE_SCROLL_BAR_HEIGHT = 1002029

Scrollbar height. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].f32

Scrollbar height, in vp. Default value: auto-adjusted height of the scroll component.

Value range: The value must be greater than or equal to 0. If the value is less than 0, the default value is used. For kids' smartwatches, the default value is restored to 37 vp. The value 0 means not to show the scrollbar.

Returns

Type Description
.value[0].f32 Scrollbar height, in vp.

NODE_LIST_DIRECTION

NODE_LIST_DIRECTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST = 1003000

Direction in which the list items are arranged. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Direction in which the list items are arranged. The parameter type is ArkUI_Axis. The default value is ARKUI_AXIS_VERTICAL.

Returns

Type Description
.value[0].i32 Direction in which the list items are arranged. The parameter type is ArkUI_Axis.

NODE_LIST_STICKY

NODE_LIST_STICKY = 1003001

Whether to pin the header to the top or the footer to the bottom in the ListItemGroup component. It is used together with the ListItemGroup component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether to pin the header to the top or the footer to the bottom in the ListItemGroup component. It is used together with the ListItemGroup component. The parameter type is ArkUI_StickyStyle. The default value is ARKUI_STICKY_STYLE_NONE.

Returns

Type Description
.value[0].i32 Whether the header is pinned to the top or the footer to the bottom in the ListItemGroup component. It is used together with the ListItemGroup component. The parameter type is ArkUI_StickyStyle.

NODE_LIST_SPACE

NODE_LIST_SPACE = 1003002

Spacing between list items. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Spacing between child components along the main axis, in vp. Default value: 0.

Returns

Type Description
.value[0].f32 Spacing between list items along the main axis.

NODE_LIST_NODE_ADAPTER

NODE_LIST_NODE_ADAPTER = 1003003

Adapter of the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object ArkUI_NodeAdapter object used as the adapter.

Returns

Type Description
.object ArkUI_NodeAdapter object.

NODE_LIST_CACHED_COUNT

NODE_LIST_CACHED_COUNT = 1003004

Number of cached items in the adapter of the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Number of cached items in the List component's adapter.
.value[1]?.i32 Whether to show cached items. The value 0 means to hide cached items, and 1 means to show cached items. The default value is 0. This parameter is supported since API version 15.
.value[2]?.i32 Maximum number of cached items in the List component. The default value is the same as that of the first parameter. This parameter is supported since API version 22.

Returns

Type Description
.value[0].i32 Number of cached items in the adapter.
.value[1].i32 Whether cached items are shown. The value 0 means that cached items are hidden, and 1 means that cached items are shown. This parameter is supported since API version 15.
.value[2].i32 Maximum number of cached items in the List component. This parameter is supported since API version 22.

NODE_LIST_SCROLL_TO_INDEX

NODE_LIST_SCROLL_TO_INDEX = 1003005

Scrolls to the item with the specified index. When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Index of the item to be scrolled to in the container. If the value is -1, the last item in the container is scrolled to.
.value[1]?.i32 Whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the smooth animation, and 0 means the opposite. The default value is 0.
.value[2]?.i32 How the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.
.value[3]?.f32 Extra offset, in vp. The default value is 0. A positive number indicates an extra offset toward the end, and a negative number indicates an extra offset toward the start. This parameter is supported since API version 15.

NODE_LIST_ALIGN_LIST_ITEM

NODE_LIST_ALIGN_LIST_ITEM = 1003006

Alignment mode of list items along the cross axis when the cross-axis width of the list is greater than the cross-axis width of list items multiplied by the number of lanes. When the list scrolls vertically, the number of lanes is the number of columns; when the list scrolls horizontally, the number of lanes is the number of rows. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Alignment mode of list items along the cross axis. The parameter type is ArkUI_ListItemAlign. The default value is ARKUI_LIST_ITEM_ALIGNMENT_START.

Returns

Type Description
.value[0].i32 Alignment mode of list items along the cross axis. The parameter type is ArkUI_ListItemAlign.

NODE_LIST_CHILDREN_MAIN_SIZE

NODE_LIST_CHILDREN_MAIN_SIZE = 1003007

Default main axis size of the child component in List.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object The parameter type is ArkUI_ListChildrenMainSize.

Returns

Type Description
.object The parameter type is ArkUI_ListChildrenMainSize.

NODE_LIST_INITIAL_INDEX

NODE_LIST_INITIAL_INDEX = 1003008

Index of the item displayed at the beginning of the viewport when the current list is loaded for the first time. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Index of the item displayed at the beginning of the viewport when the current list is loaded for the first time. The default value is 0.

Returns

Type Description
.value[0].i32 Index of the item displayed at the beginning of the viewport when the current list is loaded for the first time.

NODE_LIST_DIVIDER

NODE_LIST_DIVIDER = 1003009

Style of the divider for the list items. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].u32 Color of the divider, in 0xARGB format. The default value is 0x08000000.
.value[1].f32 Stroke width of the divider, in vp. The default value is 0.
.value[2].f32 Distance between the divider and the start of the list, in vp. The default value is 0.
.value[3].f32 Distance between the divider and the end of the list, in vp. The default value is 0.

Returns

Type Description
.value[0].u32 Color of the divider, in 0xARGB format.
.value[1].f32 Stroke width of the divider, in vp.
.value[2].f32 Distance between the divider and the start of the list, in vp.
.value[3].f32 Distance between the divider and the end of the list, in vp.

NODE_LIST_SCROLL_TO_INDEX_IN_GROUP

NODE_LIST_SCROLL_TO_INDEX_IN_GROUP = 1003010

Scrolls to the item with the specified index in the specified list item group. When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 15

Parameters

Name Description
.value[0].i32 Index of the target list item group in the current list.
.value[1].i32 Index of the target list item in the list item group.
.value[2]?.i32 Whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the smooth animation, and 0 means the opposite. The default value is 0.
.value[3]?.i32 How the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.

NODE_LIST_LANES

NODE_LIST_LANES = 1003011

Number of lanes in the list. (The number of columns is used when the list is scrolled vertically, and the number of rows is used when the list is scrolled horizontally.) This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.value[0].u32 Number of columns or rows in the List layout. When the list scrolls vertically, it indicates the number of columns; when the list scrolls horizontally, it indicates the number of rows. If the minimum or maximum column width or row height is set simultaneously, the column or row count setting does not take effect. The default value is 1. The value range is [1, +∞). When an invalid value is set, the default value is used.
.value[1]?.f32 Minimum column width or row height, in vp. Default: -1 (not set).
.value[2]?.f32 Maximum column width or row height, in vp. Default: -1 (not set).
.value[3]?.f32 Column or row spacing, in vp. Default: 0.

Returns

Type Description
.value[0].u32 Number of columns or rows in the current list layout. When the list scrolls vertically, it indicates the number of columns; when the list scrolls horizontally, it indicates the number of rows.
.value[1].f32 Minimum column width or row height, in vp.
.value[2].f32 Maximum column width or row height, in vp.
.value[3].f32 Column or row spacing, in vp.

NODE_LIST_SCROLL_SNAP_ALIGN

NODE_LIST_SCROLL_SNAP_ALIGN = 1003012

Alignment mode for scroll snapping in the List component.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.value[0].i32 Alignment mode for scroll snapping in the List component. The parameter type is ArkUI_ScrollSnapAlign. The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.

Returns

Type Description
.value[0].i32 Alignment mode for scroll snapping in the List component. The parameter type is ArkUI_ScrollSnapAlign.

NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION

NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION = 1003013

Whether to maintain the visible content's position when data is inserted or deleted outside the display area of the List component.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.value[0].i32 Whether to maintain the visible content's position when data is inserted or deleted outside the display area of the List component. The value 1 means to maintain the visible content's position, and 0 means the opposite. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the visible content's position is maintained when data is inserted or deleted outside the display area of the List component. The value 1 means that the visible content's position is maintained, and 0 means the opposite. The default value is 0.

NODE_LIST_STACK_FROM_END

NODE_LIST_STACK_FROM_END = 1003014

Whether the List component starts layout from the end.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 19

Parameters

Name Description
.value[0].i32 Whether the List component starts layout from the end. The value 0 means layout starts from the top, and 1 means layout starts from the end. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the List component starts layout from the end. The value 0 means layout starts from the top, and 1 means layout starts from the end. The default value is 0.

NODE_LIST_FOCUS_WRAP_MODE

NODE_LIST_FOCUS_WRAP_MODE = 1003015

Focus wrap mode of the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].i32 Focus wrap mode of the List component. The parameter type is ArkUI_FocusWrapMode. The default value is ARKUI_FOCUS_WRAP_MODE_DEFAULT.

Returns

Type Description
.value[0].i32 Focus wrap mode of the List component. The parameter type is ArkUI_FocusWrapMode.

NODE_LIST_SYNC_LOAD

NODE_LIST_SYNC_LOAD = 1003016

Whether the List component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].i32 Whether the List component loads child nodes synchronously. 0: frame-by-frame loading. 1: synchronous loading. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the List component loads child nodes synchronously. 0: frame-by-frame loading. 1: synchronous loading.

NODE_LIST_SCROLL_SNAP_ANIMATION_SPEED

NODE_LIST_SCROLL_SNAP_ANIMATION_SPEED = 1003017

Scroll snap animation speed for the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.value[0].i32 Scroll snap animation speed for the List component. The parameter type is ArkUI_ScrollSnapAnimationSpeed. The default value is ARKUI_SCROLL_SNAP_ANIMATION_NORMAL.

Returns

Type Description
.value[0].i32 Scroll snap animation speed for the List component. The parameter type is ArkUI_ScrollSnapAnimationSpeed.

NODE_LIST_LANES_ITEMFILLPOLICY

NODE_LIST_LANES_ITEMFILLPOLICY = 1003018

Responsive lane layout policy of the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.value[0].i32 Number of lanes at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.
.value[1]?.f32 Lane spacing, in vp. The default value is 0.

Returns

Type Description
.value[0].i32 Number of lanes at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.
.value[1].f32 Lane spacing, in vp.

NODE_LIST_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING

NODE_LIST_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING = 1003019

Whether the List component supports the generation of empty branch nodes that do not contain any child components using the if/else rendering control syntax in LazyForEach or Repeat.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether the List component supports the generation of empty branches. 0: no; 1: yes. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the List component supports the generation of empty branches. 0: no; 1: yes.

NODE_LIST_BACK_PRESS_BEHAVIOR

NODE_LIST_BACK_PRESS_BEHAVIOR = 1003020

Behavior of the system back button for the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to collapse the swipe-out component of ListItem when the system back button takes effect. 0: no; 1: yes. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the swipe-out component of ListItem is collapsed when the system back button takes effect. 0: no; 1: yes.

NODE_LIST_ENABLE_EDIT_MODE

NODE_LIST_ENABLE_EDIT_MODE = 1003021

Whether to enable the edit mode for the List component. After the edit mode is enabled, the check box is displayed by default, and users can swipe with their fingers to select multiple items. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to enable the edit mode for the List component. 0: disable; 1: enable. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the edit mode is enabled for the List component. 0: disabled; 1: enabled.

NODE_LIST_EDIT_MODE_OPTIONS

NODE_LIST_EDIT_MODE_OPTIONS = 1003022

Edit mode options of the List component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to use the default multi-selection style for the List component. 0: no; 1: yes. The default value is 1.
.value[1].i32 Whether to enable two-finger swipe to select multiple items for the List component. 0: disable; 1: enable. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the default multi-selection style is used for the List component. 0: no; 1: yes.
.value[1].i32 Whether two-finger swipe is enabled to select multiple items for the List component. 0: disabled; 1: enabled.

NODE_LIST_ITEM_SWIPE_ACTION

NODE_LIST_ITEM_SWIPE_ACTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM = 1004000

Swipe-out component of ListItem. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object ArkUI_ListItemSwipeActionOption object.

Returns

Type Description
.object ArkUI_ListItemSwipeActionOption object.

NODE_LIST_ITEM_GROUP_SET_HEADER

NODE_LIST_ITEM_GROUP_SET_HEADER = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM_GROUP = 1005000

Header component of ListItemGroup. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object ArkUI_NodeHandle object used as the header component of ListItemGroup.

Returns

Type Description
.object ArkUI_NodeHandle object used as the header component of ListItemGroup.

NODE_LIST_ITEM_GROUP_SET_DIVIDER

NODE_LIST_ITEM_GROUP_SET_DIVIDER = 1005002

Style of the divider for the list items. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].u32 Color, in 0xARGB format. The default value is 0x08000000.
.value[1].f32 Stroke width of the divider, in vp. The default value is 0.
.value[2].f32 Distance between the divider and the start of the list, in vp. The default value is 0.
.value[3].f32 Distance between the divider and the end of the list, in vp. The default value is 0.

Returns

Type Description
.value[0].u32 Color, in 0xARGB format.
.value[1].f32 Stroke width of the divider, in vp.
.value[2].f32 Distance between the divider and the start of the list, in vp.
.value[3].f32 Distance between the divider and the end of the list, in vp.

NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE

NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE = 1005003

Default main axis size of the ListItemGroup child components.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object The parameter type is ArkUI_ListChildrenMainSize.

Returns

Type Description
.object The parameter type is ArkUI_ListChildrenMainSize.

NODE_LIST_ITEM_GROUP_NODE_ADAPTER

NODE_LIST_ITEM_GROUP_NODE_ADAPTER = 1005004

Adapter of the ListItemGroup component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 15

Parameters

Name Description
.object ArkUI_NodeAdapter object used as the adapter.

Returns

Type Description
.object ArkUI_NodeAdapter object.

NODE_REFRESH_REFRESHING

NODE_REFRESH_REFRESHING = MAX_NODE_SCOPE_NUM * ARKUI_NODE_REFRESH = 1009000

Whether the component is being refreshed. This attribute can be set and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether the component is being refreshed. 1: being refreshed. 0: not being refreshed. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the component is being refreshed. 1: being refreshed. 0: not being refreshed.

NODE_REFRESH_CONTENT

NODE_REFRESH_CONTENT = 1009001

Custom content in the pull-down area. This attribute can be set and reset as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.object The parameter type is ArkUI_NodeHandle.

NODE_REFRESH_PULL_DOWN_RATIO

NODE_REFRESH_PULL_DOWN_RATIO = 1009002

Pull-down follow ratio. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Pull-down follow ratio. Value range: [0, 1]. If a value less than 0 or greater than 1 is set, the attribute setting fails.

Returns

Type Description
.value[0].f32 Pull-down follow ratio. Value range: [0, 1].

NODE_REFRESH_OFFSET

NODE_REFRESH_OFFSET = 1009003

Pull-down offset that triggers refresh. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Pull-down offset, in vp. The default value is 64.

Returns

Type Description
.value[0].f32 Pull-down offset, in vp. The default value is 64.

NODE_REFRESH_PULL_TO_REFRESH

NODE_REFRESH_PULL_TO_REFRESH = 1009004

Whether to initiate a refresh when the pull-down distance exceeds the value of refreshOffset. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether to trigger a refresh. 1: yes; 0: no. The default value is 1.

Returns

Type Description
.value[0].i32 Whether a refresh is triggered. The value 1 means a refresh is triggered, and 0 means the opposite.

NODE_REFRESH_MAX_PULL_DOWN_DISTANCE

NODE_REFRESH_MAX_PULL_DOWN_DISTANCE = 1009005

Maximum pull-down distance for refreshing. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].f32 Maximum pull-down distance, in vp. Value range: [0, +∞). Values less than 0 are treated as 0.

Returns

Type Description
.value[0].f32 Maximum pull-down distance, in vp.

NODE_REFRESH_PULL_UP_TO_CANCEL_REFRESH

NODE_REFRESH_PULL_UP_TO_CANCEL_REFRESH = 1009006

Whether to enable the pull-up-to-cancel gesture for refreshing operations. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether to enable the pull-up-to-cancel gesture for refreshing operations. 0: disable; 1: enable. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the pull-up-to-cancel gesture is enabled for refreshing operations. 0: The pull-up-to-cancel gesture is disabled; 1: The pull-up-to-cancel gesture is enabled.

NODE_WATER_FLOW_LAYOUT_DIRECTION

NODE_WATER_FLOW_LAYOUT_DIRECTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_WATER_FLOW = 1010000

Main axis direction of the WaterFlow component layout. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Main axis direction. The parameter type is ArkUI_FlexDirection. The default value is ARKUI_FLEX_DIRECTION_COLUMN.

Returns

Type Description
.value[0].i32 Main axis direction. The parameter type is ArkUI_FlexDirection.

NODE_WATER_FLOW_COLUMN_TEMPLATE

NODE_WATER_FLOW_COLUMN_TEMPLATE = 1010001

Number of columns in the water flow layout. If this attribute is not set, one column is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three columns, with the first column taking up 1/4 of the parent component's full width, the second column 1/4, and the third column 2/4. You can use columnsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of columns based on the specified column width (using track-size). repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

The unit description of track-size applies only to the repeat(auto-fill,track-size) format.

In a non-repeat template string, each item supports only the three formats: 'Number+fr', 'Number+px', and 'Number+%', and vp is not supported (for example, columnsTemplate('100vp 100vp')).

When set to '0fr', the width of that column is 0, and the components in that column are not displayed. When set to other invalid values, it is treated as one fixed column.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.string Number of columns in the layout. The default value is '1fr'.

Returns

Type Description
.string Number of columns in the layout.

NODE_WATER_FLOW_ROW_TEMPLATE

NODE_WATER_FLOW_ROW_TEMPLATE = 1010002

Number of rows in the water flow layout. If this attribute is not set, one row is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three rows, with the first row taking up 1/4 of the parent component's full height, the second row 1/4, and the third row 2/4. You can use rowsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of rows based on the specified row height (using track-size). repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

The unit description of track-size applies only to the repeat(auto-fill,track-size) format.

In a non-repeat template string, each item supports only the three formats: 'Number+fr', 'Number+px', and 'Number+%', and vp is not supported (for example, rowsTemplate('100vp 100vp')).

When set to '0fr', the height of that row is 0, and the components in that row are not displayed. When set to other invalid values, it is treated as one fixed row.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.string Number of rows in the layout. The default value is '1fr'.

Returns

Type Description
.string Number of rows in the layout.

NODE_WATER_FLOW_COLUMN_GAP

NODE_WATER_FLOW_COLUMN_GAP = 1010003

Gap between columns. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Gap between columns, in vp. The default value is 0. Value range: [0, +∞).

Returns

Type Description
.value[0].f32 Gap between columns, in vp.

NODE_WATER_FLOW_ROW_GAP

NODE_WATER_FLOW_ROW_GAP = 1010004

Gap between rows. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Gap between rows, in vp. The default value is 0. Value range: [0, +∞).

Returns

Type Description
.value[0].f32 Gap between rows, in vp.

NODE_WATER_FLOW_SECTION_OPTION

NODE_WATER_FLOW_SECTION_OPTION = 1010005

Water flow section configuration. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Zero-based index at which the changing starts. The value is converted to an integer.
.object The parameter format is ArkUI_WaterFlowSectionOption.

Returns

Type Description
.object ArkUI_WaterFlowSectionOption object.

NODE_WATER_FLOW_NODE_ADAPTER

NODE_WATER_FLOW_NODE_ADAPTER = 1010006

Adapter of the WaterFlow component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object ArkUI_NodeAdapter object used as the adapter.

Returns

Type Description
.object ArkUI_NodeAdapter object.

NODE_WATER_FLOW_CACHED_COUNT

NODE_WATER_FLOW_CACHED_COUNT = 1010007

Number of cached items in the adapter of the WaterFlow component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Number of cached items in the WaterFlow component's adapter.
.value[1]?.i32 Whether to show cached items. The value 0 means to hide cached items, and 1 means to show cached items. The default value is 0. This parameter is supported since API version 16.

Returns

Type Description
.value[0].i32 Number of cached items in the adapter.
.value[1].i32 Whether cached items are shown. The value 0 means that cached items are hidden, and 1 means that cached items are shown. This parameter is supported since API version 16.

NODE_WATER_FLOW_SCROLL_TO_INDEX

NODE_WATER_FLOW_SCROLL_TO_INDEX = 1010009

Scrolls to the item with the specified index. When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Index of the item to be scrolled to in the container.
.value[1]?.i32 Whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the smooth animation, and 0 means the opposite. The default value is 0.
.value[2]?.i32 How the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.
.value[3]?.f32 Extra offset after the target item is scrolled to, in vp. The default value is 0. A positive value offsets the scroll position downward (or toward the end); a negative value offsets it upward (or toward the start). This parameter is supported since API version 23.

NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE

NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE = 1010010

Size constraints to apply to water flow items, constraining the size range of the child component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Minimum width. Unit: vp. The value -1 indicates that the minimum width is not set.
.value[1].f32 Maximum width. Unit: vp. The value -1 indicates that the maximum width is not set.
.value[2].f32 Minimum height. Unit: vp. The value -1 indicates that the minimum height is not set.
.value[3].f32 Maximum height. Unit: vp. The value -1 indicates that the maximum height is not set.

Returns

Type Description
.value[0].f32 Minimum width, in vp. The value -1 indicates that the minimum width is not set.
.value[1].f32 Maximum width, in vp. The value -1 indicates that the maximum width is not set.
.value[2].f32 Minimum height, in vp. The value -1 indicates that the minimum height is not set.
.value[3].f32 Maximum height, in vp. The value -1 indicates that the maximum height is not set.

NODE_WATER_FLOW_LAYOUT_MODE

NODE_WATER_FLOW_LAYOUT_MODE = 1010011

Layout mode for the WaterFlow component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 18

Parameters

Name Description
.value[0].i32 Layout mode. The parameter type is ArkUI_WaterFlowLayoutMode. The default value is ARKUI_WATER_FLOW_LAYOUT_MODE_ALWAYS_TOP_DOWN.

Returns

Type Description
.value[0].i32 Layout mode. The parameter type is ArkUI_WaterFlowLayoutMode.

NODE_WATER_FLOW_SYNC_LOAD

NODE_WATER_FLOW_SYNC_LOAD = 1010012

Whether the WaterFlow component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].i32 Whether the WaterFlow component loads child nodes synchronously. 0: frame-by-frame loading. 1: synchronous loading. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the WaterFlow component loads child nodes synchronously. 0: frame-by-frame loading. 1: synchronous loading.

NODE_WATER_FLOW_COLUMN_TEMPLATE_ITEMFILLPOLICY

NODE_WATER_FLOW_COLUMN_TEMPLATE_ITEMFILLPOLICY  = 1010013

Responsive column layout policy of the WaterFlow component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.value[0].i32 Number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.

Returns

Type Description
.value[0].i32 Number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.

NODE_WATER_FLOW_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING

NODE_WATER_FLOW_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING = 1010014

Whether the WaterFlow component supports the generation of empty branch nodes that do not contain any child components using the if/else rendering control syntax in LazyForEach or Repeat.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

If the ArkUI_WaterFlowSectionOption section is set through NODE_WATER_FLOW_SECTION_OPTION or the ARKUI_WATER_FLOW_LAYOUT_MODE_SLIDING_WINDOW layout mode is set through NODE_WATER_FLOW_LAYOUT_MODE, setting this parameter to 0 or 1 will display all FlowItems after the empty branches.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether the WaterFlow component supports the generation of empty branches. 0: no; 1: yes. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the WaterFlow component supports the generation of empty branches. 0: no; 1: yes.

NODE_GRID_COLUMN_TEMPLATE

NODE_GRID_COLUMN_TEMPLATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID = 1013000

Number of columns in the Grid component. If this attribute is not set, one column is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three columns, with the first column taking up 1/4 of the parent component's full width, the second column 1/4, and the third column 2/4. You can use columnsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of columns based on the specified column width (using track-size). repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

The unit description of track-size applies only to the repeat(auto-fill,track-size) format.

In a non-repeat template string, each item supports only the three formats: 'Number+fr', 'Number+px', and 'Number+%', and vp is not supported (for example, columnsTemplate('100vp 100vp')).

When set to '0fr', the width of that column is 0, and the components in that column are not displayed. When set to other invalid values, it is treated as one fixed column.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.string Number of columns in the layout.

Returns

Type Description
.string Number of columns in the layout.

NODE_GRID_ROW_TEMPLATE

NODE_GRID_ROW_TEMPLATE = 1013001

Number of rows or the minimum row height in the Grid component. If this parameter is not set, one row is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three rows, with the first row taking up 1/4 of the parent component's full height, the second row 1/4, and the third row 2/4. You can use rowsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of rows based on the specified row height (using track-size). repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

The unit description of track-size applies only to the repeat(auto-fill,track-size) format.

In a non-repeat template string, each item supports only the three formats: 'Number+fr', 'Number+px', and 'Number+%', and vp is not supported (for example, rowsTemplate('100vp 100vp')).

When set to '0fr', the height of that row is 0, and the components in that row are not displayed. When set to other invalid values, it is treated as one fixed row.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.string Number of rows in the layout.

Returns

Type Description
.string Number of rows in the layout.

NODE_GRID_COLUMN_GAP

NODE_GRID_COLUMN_GAP = 1013002

Gap between columns. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Gap between columns, in vp. The default value is 0. Value range: [0, +∞).

Returns

Type Description
.value[0].f32 Gap between columns, in vp.

NODE_GRID_ROW_GAP

NODE_GRID_ROW_GAP = 1013003

Gap between rows. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Gap between rows, in vp. The default value is 0. Value range: [0, +∞).

Returns

Type Description
.value[0].f32 Gap between rows, in vp.

NODE_GRID_NODE_ADAPTER

NODE_GRID_NODE_ADAPTER = 1013004

Adapter of the Grid component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object ArkUI_NodeAdapter object used as the adapter.

Returns

Type Description
.object ArkUI_NodeAdapter object.

NODE_GRID_CACHED_COUNT

NODE_GRID_CACHED_COUNT = 1013005

Number of cached items in the adapter of the Grid component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Number of cached items of ArkUI_NodeAdapter, which is used with the Grid component.
.value[1].i32 Whether to show cached items. The value 0 means to hide cached items, and 1 means to show cached items. This parameter is optional. The default value is 0. This parameter is supported since API version 26.0.0.

Returns

Type Description
.value[0].i32 Number of cached items in the Grid component adapter.
.value[1].i32 Whether cached items are shown. The value 0 means that cached items are hidden, and 1 means that cached items are shown. This parameter is supported since API version 26.0.0.

NODE_GRID_FOCUS_WRAP_MODE

NODE_GRID_FOCUS_WRAP_MODE = 1013006

Focus wrap mode of the Grid component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].i32 Focus wrap mode of the Grid component. The parameter type is ArkUI_FocusWrapMode. The default value is ARKUI_FOCUS_WRAP_MODE_DEFAULT.

Returns

Type Description
.value[0].i32 Focus wrap mode of the Grid component. The parameter type is ArkUI_FocusWrapMode.

NODE_GRID_SYNC_LOAD

NODE_GRID_SYNC_LOAD = 1013007

Whether the Grid component synchronously loads child nodes. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 20

Parameters

Name Description
.value[0].i32 Whether the Grid component loads child nodes synchronously. 0: frame-by-frame loading. 1: synchronous loading. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the Grid component loads child nodes synchronously. 0: frame-by-frame loading. 1: synchronous loading.

NODE_GRID_ALIGN_ITEMS

NODE_GRID_ALIGN_ITEMS = 1013008

Alignment mode of GridItem in Grid. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.value[0].i32 Alignment mode of GridItem in Grid. The parameter type is ArkUI_GridItemAlignment. The default value is ARKUI_GRID_ITEM_ALIGNMENT_DEFAULT.

Returns

Type Description
.value[0].i32 Alignment mode of GridItem in Grid. The parameter type is ArkUI_GridItemAlignment.

NODE_GRID_LAYOUT_OPTIONS

NODE_GRID_LAYOUT_OPTIONS = 1013009

Layout options of Grid. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.object Layout options of Grid. The parameter type is ArkUI_GridLayoutOptions.

Returns

Type Description
.object ArkUI_GridLayoutOptions object.

NODE_GRID_COLUMN_TEMPLATE_ITEMFILLPOLICY

NODE_GRID_COLUMN_TEMPLATE_ITEMFILLPOLICY = 1013010

Responsive column layout policy of the Grid component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.value[0].i32 Number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.

Returns

Type Description
.value[0].i32 Number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.

NODE_GRID_EDIT_MODE

NODE_GRID_EDIT_MODE = 1013011

Whether the Grid component enters the edit mode. After the component enters the edit mode, you can drag GridItem by using the NODE_GRID_ON_ITEM_DRAG_START event. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether the Grid component enters the edit mode. 0: The component does not enter the edit mode. 1: The component enters the edit mode. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the Grid component enters the edit mode. 0: The component does not enter the edit mode. 1: The component enters the edit mode.

NODE_GRID_DRAG_ANIMATION

NODE_GRID_DRAG_ANIMATION = 1013012

Whether to enable the drag animation for GridItem in the Grid component. This attribute can be set, reset, and obtained as required through APIs.

The animation is supported only when the scrolling mode is used (only one of NODE_GRID_ROW_TEMPLATE and NODE_GRID_COLUMN_TEMPLATE is set).

Drag animations are only supported in grids with fixed size rules; scenarios involving spanning across rows or columns are not supported.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether to enable the drag animation for GridItem in the Grid component. 0: disable; 1: enable. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the drag animation is enabled for GridItem in the Grid component. 0: disabled; 1: enabled.

NODE_GRID_MULTI_SELECTABLE

NODE_GRID_MULTI_SELECTABLE = 1013013

Whether to enable mouse-based multi-selection for the Grid component. This attribute can be set, reset, and obtained as required through APIs.

After enabled, mouse-based multi-selection within the grid will trigger the NODE_GRID_ITEM_ON_SELECT event of the grid item.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether to enable mouse-based multi-selection for the Grid component. 0: disable; 1: enable. The default value is 0.

Returns

Type Description
.value[0].i32 Whether mouse-based multi-selection is enabled for the Grid component. 0: disabled; 1: enabled.

NODE_GRID_SCROLL_TO_INDEX

NODE_GRID_SCROLL_TO_INDEX = 1013014

Scrolls to the item with the specified index.

When the animation is enabled, all passed child components are loaded and counted in layout calculation. This may result in performance issues if a large number of child components are involved.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Index of the item to be scrolled to in the container.
.value[1]?.i32 Whether to enable the animation for scrolling to the target item. The value 1 means to enable, and 0 means the opposite. The default value is 0.
.value[2]?.i32 How the target item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_AUTO.
.value[3]?.f32 Extra offset after the target item is scrolled to, in vp. The default value is 0. A positive value offsets the scroll position downward (or toward the end); a negative value offsets it upward (or toward the start).

NODE_GRID_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING

NODE_GRID_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING = 1013015

Whether the Grid component supports the generation of empty branch nodes that do not contain any child components using the if/else rendering control syntax in LazyForEach or Repeat.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether the Grid component supports the generation of empty branches. 0: no; 1: yes. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the Grid component supports the generation of empty branches. 0: no; 1: yes.

NODE_GRID_ENABLE_EDIT_MODE

NODE_GRID_ENABLE_EDIT_MODE = 1013016

Whether to enable the edit mode for the Grid component. After the edit mode is enabled, the check box is displayed by default, and users can swipe with their fingers to select multiple items. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to enable the edit mode for the Grid component. 0: disable; 1: enable. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the edit mode is enabled for the Grid component. 0: disabled; 1: enabled.

NODE_GRID_EDIT_MODE_OPTIONS

NODE_GRID_EDIT_MODE_OPTIONS = 1013017

Edit mode options of the Grid component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to use the default multi-selection style for the Grid component. 0: no; 1: yes. The default value is 1.
.value[1].i32 Whether to enable two-finger swipe to select multiple items for the Grid component. 0: disable; 1: enable. The default value is 1.

Returns

Type Description
.value[0].i32 Whether the default multi-selection style is used for the Grid component. 0: no; 1: yes.
.value[1].i32 Whether two-finger swipe is enabled to select multiple items for the Grid component. 0: disabled; 1: enabled.

NODE_GRID_ITEM_STYLE

NODE_GRID_ITEM_STYLE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID_ITEM = 1014000

Style for GridItem. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 22

Parameters

Name Description
.value[0].i32 Grid item style. The parameter type is ArkUI_GridItemStyle. The default value is ARKUI_GRID_ITEM_STYLE_NONE.

Returns

Type Description
.value[0].i32 Grid item style. The parameter type is ArkUI_GridItemStyle.

NODE_GRID_ITEM_SELECTABLE

NODE_GRID_ITEM_SELECTABLE = 1014001

Whether GridItem can be selected using mouse-based multi-selection. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Whether GridItem can be selected using mouse-based multi-selection. 0: not selectable. 1: selectable. The default value is 1.

Returns

Type Description
.value[0].i32 Whether GridItem can be selected using mouse-based multi-selection. 0: not selectable. 1: selectable.

NODE_GRID_ITEM_SELECTED

NODE_GRID_ITEM_SELECTED = 1014002

Selection status of GridItem. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 23

Parameters

Name Description
.value[0].i32 Selection status of GridItem. 0: not selected. 1: selected. The default value is 0.

Returns

Type Description
.value[0].i32 Selection status of GridItem. 0: not selected. 1: selected.

NODE_ARC_LIST_DIGITAL_CROWN_SENSITIVITY

NODE_ARC_LIST_DIGITAL_CROWN_SENSITIVITY = MAX_NODE_SCOPE_NUM * ARKUI_NODE_ARC_LIST = 1019000

Crown sensitivity of the ArcList component, which can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Crown sensitivity type. The parameter type is ArkUI_CrownSensitivity. The default value is ARKUI_CROWN_SENSITIVITY_MEDIUM.

Returns

Type Description
.value[0].i32 Crown sensitivity type. The parameter type is ArkUI_CrownSensitivity.

NODE_ARC_LIST_SPACE

NODE_ARC_LIST_SPACE = 1019001

Spacing between the ArcList child components in the main axis direction. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].f32 Spacing between the child components in the main axis direction, in vp. The default value is 0.

Returns

Type Description
.value[0].f32 Spacing between the child components in the main axis direction, in vp.

NODE_ARC_LIST_CACHED_COUNT

NODE_ARC_LIST_CACHED_COUNT = 1019002

Number of cached items of the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Number of cached items.

Returns

Type Description
.value[0].i32 Number of cached items.

NODE_ARC_LIST_SCROLL_TO_INDEX

NODE_ARC_LIST_SCROLL_TO_INDEX = 1019003

Scrolls to the list item corresponding to a specified index value. When the animation is enabled, all passed list items are loaded and counted in layout calculation. This may result in performance issues if a large number of list items are involved.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Index of the item to be scrolled to in the container. If the value is -1, the last item in the container is scrolled to.
.value[1]?.i32 Whether there is an animation effect when the list item corresponding to the specified index value is scrolled to. The value 1 indicates there is an animation effect, and 0 indicates the opposite. The default value is 0.
.value[2]?.i32 How the list item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.
.value[3]?.f32 Extra offset, in vp. The default value is 0. A positive number indicates an extra offset toward the end, and a negative number indicates an extra offset toward the start.

NODE_ARC_LIST_CHAIN_ANIMATION

NODE_ARC_LIST_CHAIN_ANIMATION = 1019004

Whether to enable the chain animation effect for the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to enable the chain animation effect. The value 1 means to enable, and 0 means the opposite. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the chain animation effect is enabled. The value 1 means the chain animation effect is enabled, and 0 means the opposite.

NODE_ARC_LIST_CHILDREN_MAIN_SIZE

NODE_ARC_LIST_CHILDREN_MAIN_SIZE = 1019005

Default main axis size of the ArcList child component. The attribute can be set and reset through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 26.0.0

Parameters

Name Description
.object

Default main axis size of the ArcList child component. The parameter format is ArkUI_ListChildrenMainSize. This parameter defines the main axis sizes of all child items in ArcList.

You can useOH_ArkUI_ListChildrenMainSizeOption_Create to create the object, and use OH_ArkUI_ListChildrenMainSizeOption_Splice to adjust the array of the main axis sizes of child items in ArcList.

NODE_ARC_LIST_SET_HEADER

NODE_ARC_LIST_SET_HEADER = 1019006

Header component of ArcList. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.object ArkUI_NodeHandle object used as the header component of ArcList.

Returns

Type Description
.object ArkUI_NodeHandle object used as the header component of ArcList.

NODE_ARC_LIST_SCROLL_BAR

NODE_ARC_LIST_SCROLL_BAR = 1019007

Scrollbar display mode of the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode. The default value is ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO.

Returns

Type Description
.value[0].i32 Scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode.

NODE_ARC_LIST_SCROLL_BAR_COLOR

NODE_ARC_LIST_SCROLL_BAR_COLOR = 1019008

Scroll bar color of the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.data[0].u32 Color of the scrollbar, in 0xARGB format. The default value is 0x66182431.

Returns

Type Description
.data[0].u32 Color of the scrollbar, in 0xARGB format.

NODE_ARC_LIST_SCROLL_BAR_WIDTH

NODE_ARC_LIST_SCROLL_BAR_WIDTH = 1019009

Scroll bar width of the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].f32

Width of the scrollbar, in vp. Default value: 4.

Value range: [0, +∞). If set to a value less than 0, the default value is used. If set to 0, the scrollbar is not displayed.

Returns

Type Description
.value[0].f32 Width of the scrollbar, in vp.

NODE_ARC_LIST_ENABLE_SCROLL_INTERACTION

NODE_ARC_LIST_ENABLE_SCROLL_INTERACTION = 1019010

Whether the ArcList component supports scroll gestures. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to support scroll gestures. The default value is 1. The value 1 means to support, and 0 means the opposite.

Returns

Type Description
.value[0].i32 Whether scroll gestures are supported. The value 1 means scroll gestures are supported, and 0 means the opposite.

NODE_ARC_LIST_FADING_EDGE

NODE_ARC_LIST_FADING_EDGE = 1019011

Edge fade effect of the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to enable the edge fade effect. 0: Disable the edge fade effect. 1: Enable the edge fade effect. The default value is 0.
.value[1]?.f32 Length of the edge fade effect. The unit is vp. The default value is 32.

Returns

Type Description
.value[0].i32 Whether the edge fade effect is enabled. 0: The edge fade effect is disabled. 1: The edge fade effect is enabled.
.value[1].f32 Length of the edge fade effect. The unit is vp.

NODE_ARC_LIST_FRICTION

NODE_ARC_LIST_FRICTION = 1019012

Friction coefficient of the ArcList component, which can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].f32 Friction coefficient. The default value is 0.8. Value range: (0, +∞). If this parameter is set to a value less than or equal to 0, the default value is used.

Returns

Type Description
.value[0].f32 Friction coefficient.

NODE_ARC_LIST_FLING_SPEED_LIMIT

NODE_ARC_LIST_FLING_SPEED_LIMIT = 1019013

Maximum initial speed of the fling animation in the ArcList component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].f32 Maximum initial velocity at the start of the fling animation, in vp/s. Default value: 9000.

Returns

Type Description
.value[0].f32 Maximum initial velocity at the start of the fling animation, in vp/s.

NODE_ARC_LIST_ITEM_AUTO_SCALE

NODE_ARC_LIST_ITEM_AUTO_SCALE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_ARC_LIST_ITEM = 1020000

Whether to enable automatic scaling for ArcListItem. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Whether to enable automatic scaling. The value 1 means to enable, and 0 means the opposite. The default value is 1.

Returns

Type Description
.value[0].i32 Whether auto-scaling is enabled. The value 1 means auto-scaling is enabled, and 0 means the opposite.

NODE_ARC_LIST_ITEM_SWIPE_ACTION

NODE_ARC_LIST_ITEM_SWIPE_ACTION = 1020001

Swipe-out component of ArcListItem. This attribute can be set and reset as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 26.0.0

Parameters

Name Description
.object

ArkUI_ListItemSwipeActionOption object.

This parameter defines the swipe-out component information of ArcListItem. You can use OH_ArkUI_ListItemSwipeActionOption_Create to create the object, and use OH_ArkUI_ListItemSwipeActionOption_SetStart to set the content on the left (in the vertical layout) or above (in the horizontal layout) of ListItemSwipeActionItem.

NODE_ARC_SCROLL_BAR_BIND_SCROLLABLE

NODE_ARC_SCROLL_BAR_BIND_SCROLLABLE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_ARC_SCROLL_BAR = 1021000

Scrollable component bound to ArcScrollBar. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.object ArkUI_NodeHandle object used as the scrollable component bound to ArcScrollBar.

Returns

Type Description
.object ArkUI_NodeHandle object used as the scrollable component bound to ArcScrollBar.

NODE_ARC_SCROLL_BAR_DISPLAY_MODE

NODE_ARC_SCROLL_BAR_DISPLAY_MODE = 1021001

Scrollbar display mode of ArcScrollBar. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 26.0.0

Parameters

Name Description
.value[0].i32 Scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode. The default value is ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO.

Returns

Type Description
.value[0].i32 Scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode.