openharmony 鸿蒙 ts-appendix-enums

2025-06-12 浏览 (1)

Enums

NOTE

The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Color

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

ColorValueIllustration
Black0x000000en-us_image_0000001219864153
Blue0x0000ffen-us_image_0000001174104404
Brown0xa52a2aen-us_image_0000001219744201
Gray0x808080en-us_image_0000001174264376
Grey0x808080en-us_image_0000001174264376
Green0x008000en-us_image_0000001174422914
Orange0xffa500en-us_image_0000001219662661
Pink0xffc0cben-us_image_0000001219662663
Red0xff0000en-us_image_0000001219662665
White0xffffffen-us_image_0000001174582866
Yellow0xffff00en-us_image_0000001174582864
Transparent9+rgba(0,0,0,0)Transparent

ImageFit

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
Contain0The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
ImageFit-Examples01
Cover1The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
ImageFit-Examples02
Auto2The image is scaled automatically based on its own size and the size of the component to fit the display area.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
ImageFit-Examples03
Fill3The image is scaled to fill the display area, and its aspect ratio is not retained.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
ImageFit-Examples04
ScaleDown4The image is displayed with its aspect ratio retained, in a size smaller than or equal to the original size.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
ImageFit-Examples05
None5The image is displayed in its original size.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
ImageFit-Examples06
TOP_START12+7The image is displayed at the top start corner of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples07
TOP12+8The image is displayed horizontally centered at the top of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples08
TOP_END12+9The image is displayed at the top end corner of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples09
START12+10The image is displayed vertically centered at the start of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples10
CENTER12+11The image is displayed at the center of the Image component both horizontally and vertically, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples11
END12+12The image is displayed vertically centered at the end of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples12
BOTTOM_START12+13The image is displayed at the bottom start corner of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples13
BOTTOM12+14The image is displayed horizontally centered at the bottom of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples14
BOTTOM_END12+15The image is displayed at the bottom end corner of the Image component, keeping its original size.
Widget capability: This API can be used in ArkTS widgets since API version 12.
Atomic service API: This API can be used in atomic services since API version 12.
ImageFit-Examples15
MATRIX15+16The image, with the use of imageMatrix, is displayed in the specified position of the Image component, keeping its original size. SVG images are not supported.
Atomic service API: This API can be used in atomic services since API version 15.

BorderStyle

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
DottedDotted border. The radius of a dot is half of borderWidth.
DashedDashed border.
SolidSolid border.

LineJoinStyle

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
BevelBevel is used to connect paths.
MiterMiter is used to connect paths.
RoundRound is used to connect paths.

TouchType

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
DownA finger is pressed.
UpA finger is lifted.
MoveA finger moves on the screen in pressed state.
CancelA touch event is canceled.

MouseButton8+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
LeftLeft button on the mouse.
RightRight button on the mouse.
MiddleMiddle button on the mouse.
BackBack button on the left of the mouse.
ForwardForward button on the left of the mouse.
NoneNo button.

MouseAction8+

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
PressThe mouse button is pressed.
Atomic service API: This API can be used in atomic services since API version 11.
ReleaseThe mouse button is released.
Atomic service API: This API can be used in atomic services since API version 11.
MoveThe mouse cursor moves.
Atomic service API: This API can be used in atomic services since API version 11.
HoverThe mouse pointer is hovered on an element.
NOTE
This value has no effect.
Atomic service API: This API can be used in atomic services since API version 11.
CANCEL18+The mouse button action is canceled.
Atomic service API: This API can be used in atomic services since API version 18.

ModifierKey10+

Enumerates the input method modifier keys.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
CTRLCtrl key on the keyboard.
SHIFTShift key on the keyboard.
ALTAlt key on the keyboard.

FunctionKey10+

Enumerates the input method function keys.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
ESCEsc key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F1F1 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F2F2 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F3F3 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F4F4 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F5F5 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F6F6 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F7F7 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F8F8 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F9F9 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F10F10 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F11F11 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
F12F12 key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 11.
TAB12+Tab key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 12.
DPAD_UP12+Up arrow key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 12.
DPAD_DOWN12+Down arrow key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 12.
DPAD_LEFT12+Left arrow key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 12.
DPAD_RIGHT12+Right arrow key on the keyboard.
Atomic service API: This API can be used in atomic services since API version 12.

Curve

Enumerates the interpolation curves. For details about the animation, see Bezier Curve.

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
LinearThe animation speed keeps unchanged.
EaseThe animation starts slowly, accelerates, and then slows down towards the end. The cubic-bezier curve (0.25, 0.1, 0.25, 1.0) is used.
EaseInThe animation starts at a low speed and then picks up speed until the end. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used.
EaseOutThe animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used.
EaseInOutThe animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used.
FastOutSlowInThe animation uses the standard cubic-bezier curve (0.4, 0.0, 0.2, 1.0).
LinearOutSlowInThe animation uses the deceleration cubic-bezier curve (0.0, 0.0, 0.2, 1.0).
FastOutLinearInThe animation uses the acceleration cubic-bezier curve (0.4, 0.0, 1.0, 1.0).
ExtremeDecelerationThe animation uses the extreme deceleration cubic-bezier curve (0.0, 0.0, 0.0, 1.0).
SharpThe animation uses the sharp cubic-bezier curve (0.33, 0.0, 0.67, 1.0).
RhythmThe animation uses the rhythm cubic-bezier curve (0.7, 0.0, 0.2, 1.0).
SmoothThe animation uses the smooth cubic-bezier curve (0.4, 0.0, 0.4, 1.0).
FrictionThe animation uses the friction cubic-bezier curve (0.2, 0.0, 0.2, 1.0).

AnimationStatus

Widget capability: This API can be used in ArkTS widgets since API version 10.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
InitialThe animation is in the initial state.
RunningThe animation is being played.
PausedThe animation is paused.
StoppedThe animation is stopped.

FillMode

Widget capability: This API can be used in ArkTS widgets since API version 10.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
NoneBefore execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state.
ForwardsThe target component retains the state set by the last keyframe encountered during execution of the animation.
BackwardsThe animation applies the values defined in the first relevant keyframe once it is applied to the target component, and retains the values during the period set by delay. The first relevant keyframe depends on the value of playMode. If playMode is Normal or Alternate, the first relevant keyframe is in the from state. If playMode is Reverse or AlternateReverse, the first relevant keyframe is in the to state.
BothThe animation follows the rules for both Forwards and Backwards, extending the animation attributes in both directions.

PlayMode

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
NormalThe animation is played forwards.
ReverseThe animation is played backwards.
AlternateThe animation is played forwards for an odd number of times (1, 3, 5...) and backwards for an even number of times (2, 4, 6...).
AlternateReverseThe animation is played backwards for an odd number of times (1, 3, 5...) and forwards for an even number of times (2, 4, 6...).

KeyType

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
DownThe key is pressed.
UpThe key is released.

KeySource

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
UnknownUnknown input device.
KeyboardThe input device is a keyboard.
JOYSTICK15+The input device is a joystick.
Atomic service API: This API can be used in atomic services since API version 15.

Edge

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
TopTop edge in the vertical direction.
Atomic service API: This API can be used in atomic services since API version 11.
Center(deprecated) Center position in the vertical direction.
This API is deprecated since API version 9.
BottomBottom edge in the vertical direction.
Atomic service API: This API can be used in atomic services since API version 11.
Baseline(deprecated) Text baseline position in the cross axis direction.
This API is deprecated since API version 9.
StartStart position in the horizontal direction.
Atomic service API: This API can be used in atomic services since API version 11.
Middle(deprecated) Center position in the horizontal direction.
This API is deprecated since API version 9.
EndEnd position in the horizontal direction.
Atomic service API: This API can be used in atomic services since API version 11.

Week

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
MonMonday.
TueTuesday.
WedWednesday.
ThurThursday.
FriFriday.
SatSaturday.
SunSunday.

Direction

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
LtrComponents are arranged from left to right.
RtlComponents are arranged from right to left.
AutoThe default layout direction is used.

BarState

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
OffNot displayed.
OnAlways displayed.
AutoDisplayed when the screen is touched and hidden after 2s.

TitleHeight9+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
MainOnlyRecommended height (56 vp) of the title bar when only the main title is available.
MainWithSubRecommended height (82 vp) of the title bar when both the main title and subtitle exist.

EdgeEffect

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
SpringSpring effect. When at one of the edges, the component can move beyond the bounds through touches, and produces a bounce effect when the user releases their finger.
FadeFade effect. When at one of the edges, the component produces a fade effect.
NoneNo effect when the component is at one of the edges.

Alignment

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
TopStartTop start.
TopHorizontally centered on the top.
TopEndTop end.
StartVertically centered start.
CenterHorizontally and vertically centered.
EndVertically centered end.
BottomStartBottom start.
BottomHorizontally centered on the bottom.
BottomEndBottom end.

TransitionType

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
AllThe transition takes effect in all scenarios.
InsertThe transition takes effect when a component is inserted or displayed.
DeleteThe transition takes effect when a component is deleted or hidden.

RelateType

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
FILLThe current child component is scaled to fill the parent component.
FITThe current child component is scaled to adapt to the parent component.

Visibility

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
HiddenThe component is hidden, and a placeholder is used for it in the layout.
VisibleThe component is visible.
NoneThe component is hidden. It is not involved in the layout, and no placeholder is used for it.

LineCapStyle

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
ButtThe ends of the line are squared off, and the line does not extend beyond its two endpoints.
RoundThe line is extended at the endpoints by a half circle whose diameter is equal to the line width.
SquareThe line is extended at the endpoints by a rectangle whose width is equal to half the line width and height equal to the line width.

Axis

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
VerticalVertical direction.
HorizontalHorizontal direction.

HorizontalAlign

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
StartAligned with the start edge in the same direction as the language in use.
CenterAligned with the center. This is the default alignment mode.
EndAligned with the end edge in the same direction as the language in use.

FlexAlign

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
StartThe child components are aligned with the start edge of the main axis. The first component is aligned with the main-start, and subsequent components are aligned with the previous one.
CenterThe child components are aligned in the center of the main axis. The space between the first component and the main-start is the same as that between the last component and the main-end.
EndThe child components are aligned with the end edge of the main axis. The last component is aligned with the main-end, and other components are aligned with the next one.
SpaceBetweenThe child components are evenly distributed along the main axis. The space between any two adjacent components is the same. The first component is aligned with the main-start, the last component is aligned with the main-end, and the remaining components are distributed so that the space between any two adjacent components is the same.
SpaceAroundThe child components are evenly distributed along the main axis. The space between any two adjacent components is the same. The space between the first component and main-start, and that between the last component and cross-main are both half the size of the space between two adjacent components.
SpaceEvenlyThe child components are evenly distributed along the main axis. The space between the first component and main-start, the space between the last component and main-end, and the space between any two adjacent components are the same.

ItemAlign

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
AutoThe default configuration of the flex container is used.
StartThe items in the flex container are aligned with the cross-start edge.
CenterThe items in the flex container are centered along the cross axis.
EndThe items in the flex container are aligned with the cross-end edge.
StretchThe items in the flex container are stretched and padded along the cross axis. If the flex container has the Wrap attribute set to FlexWrap.Wrap or FlexWrap.WrapReverse, the items are stretched to the cross size of the widest element on the current row or column. In other cases, the items are stretched to the container size regardless of whether their size is set.
BaselineThe items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis.

FlexDirection

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
RowThe child components are arranged in the same direction as the main axis runs along the rows.
RowReverseThe child components are arranged opposite to the Row direction.
ColumnThe child components are arranged in the same direction as the main axis runs down the columns.
ColumnReverseThe child components are arranged opposite to the Column direction.

FlexWrap

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
NoWrapThe child components in the flex container are arranged in a single line. If any of them have minimum size constraints applied, the flex container does not forcibly shrink them when overflow occurs.
WrapThe child components in the flex container are arranged in multiple lines, and they may overflow.
WrapReverseThe child components in the flex container are reversely arranged in multiple lines, and they may overflow.

VerticalAlign

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
TopTop aligned.
CenterCenter aligned. This is the default alignment mode.
BottomBottom aligned.

ImageRepeat

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
XThe image is repeatedly drawn only along the horizontal axis.
YThe image is repeatedly drawn only along the vertical axis.
XYThe image is repeatedly drawn along both axes.
NoRepeatThe image is not repeatedly drawn.

ImageSize

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
Cover1The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
Contain2The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
Auto0The original image aspect ratio remains unchanged. Default value.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
FILL12+3The image is scaled to fill the display area, and its aspect ratio is not retained.
Atomic service API: This API can be used in atomic services since API version 12.

GradientDirection

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
LeftThe gradient direction is from right to left.
TopThe gradient direction is from bottom to top.
RightThe gradient direction is from left to right.
BottomThe gradient direction is from top to bottom.
LeftTopThe gradient direction is upper left.
LeftBottomThe gradient direction is lower left.
RightTopThe gradient direction is upper right.
RightBottomThe gradient direction is lower right.
NoneNo gradient.

SharedTransitionEffectType

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
StaticThe element position remains unchanged on the target page, and transition opacity can be configured. Currently, this effect is only valid in redirecting to the target page.
ExchangeThe element is relocated and scaled properly on the target page.

FontStyle

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
NormalStandard font style.
ItalicItalic font style.

FontWeight

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
Lighter100The font weight is lighter.
Normal400The font weight is normal.
Regular400The font weight is regular.
Medium500The font weight is medium.
Bold700The font weight is bold.
Bolder900The font weight is bolder.

TextAlign

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
StartAligned with the start.
Widget capability: This API can be used in ArkTS widgets since API version 9.
CenterHorizontally centered.
Widget capability: This API can be used in ArkTS widgets since API version 9.
EndAligned with the end.
Widget capability: This API can be used in ArkTS widgets since API version 9.
JUSTIFY10+Aligned with both margins.
Widget capability: This API can be used in ArkTS widgets since API version 10.

TextOverflow

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
NoneOverflowing content is clipped at the limit of the maximum line width.
Widget capability: This API can be used in ArkTS widgets since API version 9.
ClipOverflowing content is clipped at the limit of the maximum line width.
Widget capability: This API can be used in ArkTS widgets since API version 9.
EllipsisAn ellipsis (...) is used to represent text overflow.
Widget capability: This API can be used in ArkTS widgets since API version 9.
MARQUEE10+Text continuously scrolls when text overflow occurs.

TextDecorationType

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
UnderlineLine under the text.
LineThroughLine through the text.
OverlineLine over the text.
NoneNo text decoration.

TextCase

Widget capability: This API can be used in ArkTS widgets since API version 9.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
NormalThe original case of the text is retained.
LowerCaseAll letters in the text are in lowercase.
UpperCaseAll letters in the text are in uppercase.

ResponseType8+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
LongPressThe menu is displayed when the component is long-pressed.
RightClickThe menu is displayed when the component is right-clicked.

HoverEffect8+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
AutoDefault hover effect.
ScaleScale effect.
HighlightBackground fade-in and fade-out effect.
NoneNo effect.

Placement8+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
LeftThe popup is on the left of the component, vertically aligned with the component on the left.
RightThe popup is on the right of the component, vertically aligned with the component on the right.
TopThe popup is at the top of the component, horizontally aligned with the component at the top.
BottomThe popup is at the bottom of the component, horizontally aligned with the component at the bottom.
TopLeftThe popup is at the top of the component and, since API version 9, aligned with the left of the component.
TopRightThe popup is at the top of the component and, since API version 9, aligned with the right of the component.
BottomLeftThe popup is at the bottom of the component and, since API version 9, aligned with the left of the component.
BottomRightThe popup is at the bottom of the component and, since API version 9, aligned with the right of the component.
LeftTop9+The popup is on the left of the component and aligned with the top of the component.
LeftBottom9+The popup is on the left of the component and aligned with the bottom of the component.
RightTop9+The popup is on the right of the component and aligned with the top of the component.
RightBottom9+The popup is on the right of the component and aligned with the bottom of the component.

CopyOptions9+

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
None0Copy is not allowed.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
InApp1Intra-application copy is allowed.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
LocalDevice2Intra-device copy is allowed.
Widget capability: This API can be used in ArkTS widgets since API version 9.
Atomic service API: This API can be used in atomic services since API version 11.
CROSS_DEVICE(deprecated)3Cross-device copy is allowed.
Widget capability: This API can be used in ArkTS widgets since API version 11.
NOTE
This API is supported since API version 11 and deprecated since API version 12.

HitTestMode9+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
DefaultBoth the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from the hit test.
BlockThe node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit test.
TransparentBoth the node and its child node respond to the hit test of a touch event, and its sibling node is also considered during the hit test.
NoneThe node does not respond to the hit test of a touch event, but its child node and sibling node are considered during the hit test.

DialogButtonStyle10+

System capability: SystemCapability.ArkUI.ArkUI.Full

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
DEFAULT0Blue text on white background (black background under the dark theme).
HIGHLIGHT1White text on blue background.

TextHeightAdaptivePolicy10+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
MAX_LINES_FIRSTPrioritize the maxLines settings.
MIN_FONT_SIZE_FIRSTPrioritize the minFontSize settings.
LAYOUT_CONSTRAINT_FIRSTPrioritize the layout constraint settings in terms of height.

NestedScrollMode10+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
SELF_ONLYThe scrolling is contained within the component, and no scroll chaining occurs, that is, the parent component does not scroll when the component scrolling reaches the boundary.
SELF_FIRSTThe component scrolls first, and when it hits the boundary, the parent component scrolls. When the parent component hits the boundary, its edge effect is displayed. If no edge effect is specified for the parent component, the edge effect of the child component is displayed instead.
PARENT_FIRSTThe parent component scrolls first, and when it hits the boundary, the component scrolls. When the component hits the boundary, its edge effect is displayed. If no edge effect is specified for the component, the edge effect of the parent component is displayed instead.
PARALLELThe component and its parent component scroll at the same time. When both the component and its parent component hit the boundary, the edge effect of the component is displayed. If no edge effect is specified for the component, the edge effect of the parent component is displayed instead.

ObscuredReasons10+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
PLACEHOLDER0The content is replaced by a placeholder.

ColoringStrategy10+

Enumerates the coloring strategies.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
INVERTinvertThe foreground colors are the inverse of the component background colors. This strategy is only applicable when set within the foregroundColor attribute.
Atomic service API: This API can be used in atomic services since API version 11.
AVERAGE11+averageThe shadow colors of the component are the average color obtained from the component background shadow area. This strategy is only applicable when set within the shadow attribute whose input parameter type is ShadowOptions.
Atomic service API: This API can be used in atomic services since API version 12.
PRIMARY11+primaryThe shadow colors of the component are the primary color obtained from the component background shadow area. This strategy is only applicable when set within the shadow attribute whose input parameter type is ShadowOptions.
Atomic service API: This API can be used in atomic services since API version 12.

ClickEffectLevel10+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescriptionAnimation SettingsDefault Zoom Ratio
LIGHTSmall area (light)Spring effect, with stiffness of 410, damping of 38, and initial velocity of 1.90%
MIDDLEMedium area (stable)Spring effect, with stiffness of 350, damping of 35, and initial velocity of 0.5.95%
HEAVYLarge area (heavy)Spring effect, with stiffness of 240, damping of 28, and initial velocity of 0.95%

CheckBoxShape11+

Widget capability: This API can be used in ArkTS widgets since API version 11.

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
CIRCLE0Circle.
ROUNDED_SQUARE1Rounded square.

FoldStatus11+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
FOLD_STATUS_UNKNOWN0The folding status of the device is unknown.
FOLD_STATUS_EXPANDED1The device is fully open.
FOLD_STATUS_FOLDED2The device is folded (completely closed).
FOLD_STATUS_HALF_FOLDED3The device is half-folded, somewhere between fully open and completely closed.

TextContentStyle10+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
DEFAULTDefault style. The caret width is fixed at 1.5 vp, and the caret height is subject to the background height and font size of the selected text.
INLINEInline input style. The background height of the selected text is the same as the height of the text box.
This style is used in scenarios where editing and non-editing states are obvious, for example, renaming in the file list view.
The showError attribute is not supported for this style.
This style does not allow for text dragging and dropping.

Nullable<T>11+

type Nullable<T> = T|undefined;

The object of this type can be of a custom type or undefined.

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

TypeDescription
T |undefinedThe object of this type can be of a custom type or undefined.

WordBreak11+

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
NORMAL0Word breaks can occur between any two characters for Chinese, Japanese, and Korean (CJK) text, but can occur only at a space character for non-CJK text (such as English).
Atomic service API: This API can be used in atomic services since API version 11.
BREAK_ALL1Line breaks can occur between any two characters for non-CJK text. CJK text behavior is the same as for NORMAL.
Atomic service API: This API can be used in atomic services since API version 11.
BREAK_WORD2This option has the same effect as BREAK_ALL for non-CJK text, except that it preferentially wraps lines at appropriate characters (for example, spaces) whenever possible. CJK text behavior is the same as for NORMAL.
Atomic service API: This API can be used in atomic services since API version 11.
HYPHENATION18+3Line breaks can occur between any two syllabic units for non-CJK text. CJK text behavior is the same as for NORMAL.
Atomic service API: This API can be used in atomic services since API version 18.

LineBreakStrategy12+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
GREEDY0Places as many words on a line as possible and moves to the next line only if no more words can fit into the same line.
HIGH_QUALITY1Fills in lines as much as possible on the basis of BALANCED, which may results in a large blank area on the last line.
BALANCED2Balances the line length when possible without word splitting.

TextSelectableMode12+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
SELECTABLE_UNFOCUSABLE0The text is selectable, but not focusable. Setting the selection, bindSelectionMenu, or copyOption attribute does not affect the behavior.
SELECTABLE_FOCUSABLE1The text is selectable and focusable. It obtains focus when touched.
UNSELECTABLE2The text is not selectable nor focusable. The selection, bindSelectionMenu, and copyOption attributes do not work in this case.

AccessibilityHoverType12+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
HOVER_ENTER0A finger is pressed.
HOVER_MOVE1The touch moves.
HOVER_EXIT2The finger is lifted.
HOVER_CANCEL3The current event is canceled.

EllipsisMode11+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
START0An ellipsis is used at the start of the line of text.
CENTER1An ellipsis is used at the center of the line of text.
END2An ellipsis is used at the end of the line of text.

ArrowPointPosition11+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
START'Start'On the leftmost side of the parent component in the horizontal layout; on the top of the parent component in the vertical layout.
CENTER'Center'In the center of the parent component.
END'End'On the rightmost side of the parent component in the horizontal layout; at the bottom of the parent component in the vertical layout.

OptionWidthMode11+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
FIT_CONTENT'fit_content'Uses the default width, that is, width of two columns.
FIT_TRIGGER'fit_trigger'Inherits the width of the drop-down list button.

PixelRoundCalcPolicy11+

Enumerates the pixel rounding policies for component boundaries.

Widget capability: This API can be used in ArkTS widgets since API version 11.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
NO_FORCE_ROUND0The value is not rounded off.
FORCE_CEIL1The value is rounded up to the nearest integer.
FORCE_FLOOR2The value is rounded down to the nearest integer.

TextDecorationStyle12+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
SOLID0Single solid line (default value).
DOUBLE1Double solid line.
DOTTED2Dotted line.
DASHED3Dashed line.
WAVY4Wavy line.

EmbeddedType12+

Enumerates the types of the providers that can be started by the EmbeddedComponent.

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
EMBEDDED_UI_EXTENSION0EmbeddedUIExtensionAbility.

MarqueeUpdateStrategy12+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
DEFAULT0After the marquee attributes are updated, the marquee scrolls from the start position.
PRESERVE_POSITION1After the marquee attributes are updated, the marquee scrolls from the current position.

AppRotation12+

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
ROTATION_000 degrees.
ROTATION_90190 degrees.
ROTATION_1802180 degrees.
ROTATION_2703270 degrees.

ScrollSource12+

Enumerates the sources of scroll operations.

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
DRAG0Drag event.
FLING1Inertia scrolling after the drag ends.
EDGE_EFFECT2Edge scrolling effect with EdgeEffect.Spring.
OTHER_USER_INPUT3Other user inputs aside from dragging, such as those from the mouse wheel and keyboard events.
SCROLL_BAR4Drag event from the scrollbar.
SCROLL_BAR_FLING5Inertia scrolling with velocity after the scrollbar is released.
SCROLLER6Non-animated methods of the Scroller object.
SCROLLER_ANIMATION7Animated methods of the Scroller object.

ImageSpanAlignment10+

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
TOPThe image is top aligned with the line.
CENTERThe image is centered aligned with the line.
BOTTOMThe image is bottom aligned with the line.
BASELINEThe image is bottom aligned with the text baseline.

XComponentType10+

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
SURFACEThe component is used for EGL/OpenGLES and media data input, where the custom content is displayed individually on the screen. When the background color is set to black, the display subsystem (DSS) is used.
Atomic service API: This API can be used in atomic services since API version 11.
COMPONENT(deprecated)The component becomes a container where non-UI logic can be executed to dynamically load the display content.
NOTE
This API is deprecated since API version 12. You are advised to use other container components instead.
Atomic service API: This API can be used in atomic services since API version 11.
TEXTUREThe component is used for EGL/OpenGLES and media data input, where the custom content is combined with the content of the component and then displayed on the screen. 1. Frame synchronization is maintained, which ensures that the GPU textures and other ArkUI drawing commands are batched and sent to the RenderService within the same frame. 2. Animations are unified with built-in components. 3. As the GPU is used for composition, this type may consume more power compared to the surface type that uses the display subsystem (DSS).
Atomic service API: This API can be used in atomic services since API version 11.
NODE12+The component is used as a placeholder container for native UI nodes. Page components developed with native APIs can be displayed within this container's area.
NOTE
This type is no longer being evolved. You are advised to use the ContentSlot placeholder component for managing components created with native APIs. ContentSlot is superior to the NODE-type XComponent in terms of memory and performance.
Atomic service API: This API can be used in atomic services since API version 12.

HoverModeAreaType14+

Enumerates the types of display areas for the hover mode.

Atomic service API: This API can be used in atomic services since API version 14.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
TOP_SCREEN0Upper half screen.
BOTTOM_SCREEN1Lower half screen.

WidthBreakpoint13+

Enumerates the width breakpoint values corresponding to different window width thresholds. The value is returned through getWindowWidthBreakpoint.

Atomic service API: This API can be used in atomic services since API version 13.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
WIDTH_XS0The window width is less than 320 vp.
WIDTH_SM1The window width is greater than or equal to 320 vp and less than 600 vp.
WIDTH_MD2The window width is greater than or equal to 600 vp and less than 840 vp.
WIDTH_LG3The window width is greater than or equal to 840 vp and less than 1440 vp.
WIDTH_XL4The window width is greater than or equal to 1440 vp.

HeightBreakpoint13+

Enumerates the height breakpoint values corresponding to different window aspect ratio thresholds. The value is returned through getWindowHeightBreakpoint.

Atomic service API: This API can be used in atomic services since API version 13.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
HEIGHT_SM0The window aspect ratio is less than 0.8.
HEIGHT_MD1The window aspect ratio is greater than or equal to 0.8 and less than 1.2.
HEIGHT_LG2The window aspect ratio is greater than or equal to 1.2.

AxisModel15+

Enumerates the axis types for focus axis events.

Atomic service API: This API can be used in atomic services since API version 15.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
ABS_X0Game controller x-axis.
ABS_Y1Game controller y-axis.
ABS_Z2Game controller z-axis.
ABS_RZ3Game controller rz-axis.
ABS_GAS4Game controller GAS-axis.
ABS_BRAKE5Game controller BRAKE-axis.
ABS_HAT0X6Game controller HAT0X-axis.
ABS_HAT0Y7Game controller HAT0Y-axis.

PageFlipMode15+

Enumerates the modes for flipping pages using the mouse wheel.

Atomic service API: This API can be used in atomic services since API version 15.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
CONTINUOUS0Continuous page flipping mode where multiple pages are turned continuously when the user scrolls the mouse wheel without interruption.
SINGLE1Single-page flipping mode where the mouse wheel event is ignored until the current page flipping animation is complete.

RenderFit10+

Enumerates the modes in which the final state of the component's content is rendered during its width and height animation process.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameDescription
CENTERThe component's content stays at the final size and always aligned with the center of the component. renderfit_center
TOPThe component's content stays at the final size and always aligned with the top center of the component. renderfit_top
BOTTOMThe component's content stays at the final size and always aligned with the bottom center of the component. renderfit_bottom
LEFTThe component's content stays at the final size and always aligned with the left of the component. renderfit_left
RIGHTThe component's content stays at the final size and always aligned with the right of the component. renderfit_right
TOP_LEFTThe component's content stays at the final size and always aligned with the upper left corner of the component. renderfit_top_left
TOP_RIGHTThe component's content stays at the final size and always aligned with the upper right corner of the component. renderfit_top_right
BOTTOM_LEFTThe component's content stays at the final size and always aligned with the lower left corner of the component. renderfit_bottom_left
BOTTOM_RIGHTThe component's content stays at the final size and always aligned with the lower right corner of the component. renderfit_bottom_right
RESIZE_FILLThe component's content is always resized to fill the component's content box, without considering its aspect ratio in the final state. renderfit_resize_fill
RESIZE_CONTAINWhile maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. It is always aligned with the center of the component. renderfit_resize_contain
RESIZE_CONTAIN_TOP_LEFTWhile maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. When there is remaining space in the width direction of the component, the content is left-aligned with the component. When there is remaining space in the height direction of the component, the content is top-aligned with the component. renderfit_resize_contain_top_left
RESIZE_CONTAIN_BOTTOM_RIGHTWhile maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. When there is remaining space in the width direction of the component, the content is right-aligned with the component. When there is remaining space in the height direction of the component, the content is bottom-aligned with the component. renderfit_resize_contain_bottom_right
RESIZE_COVERWhile maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. It is always aligned with the center of the component, so that its middle part is displayed. renderfit_resize_cover
RESIZE_COVER_TOP_LEFTWhile maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. When there is remaining space in the width direction, the content is left-aligned with the component, so that its left part is displayed. When there is remaining space in the height direction, the content is top-aligned with the component, so that its top part is displayed. renderfit_resize_cover_top_left
RESIZE_COVER_BOTTOM_RIGHTWhile maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. When there is remaining space in the width direction, the content is right-aligned with the component, so that its right part is displayed. When there is remaining space in the height direction, the content is bottom-aligned with the component, so that its bottom part is displayed. renderfit_resize_cover_bottom_right

NOTE

  • In the illustrative diagrams, the blue area indicates the content, and the orange area indicates the component content box.
  • Different render fit modes create different effects during the width and height animation process. Choose the one that best fits your need.

CrownAction18+

Enumerates the crown actions.

Atomic service API: This API can be used in atomic services since API version 18.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
BEGIN0The crown starts to rotate.
UPDATE1The crown is rotating.
END2The crown stops rotating.

CrownSensitivity18+

Enumerates the sensitivity levels for crown rotation.

Atomic service API: This API can be used in atomic services since API version 18.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
LOW0Low sensitivity.
MEDIUM1Medium sensitivity.
HIGH2High sensitivity.

AxisAction18+

Enumerates the types of axis actions for axis events.

Atomic service API: This API can be used in atomic services since API version 18.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
NONE0No axis event.
BEGIN1The axis event begins.
UPDATE2The axis event is in progress.
END3The axis event ends.
CANCEL4The axis event is canceled.

InteractionHand15+

Defines whether an event is triggered by a left-hand or right-hand tap.

Atomic service API: This API can be used in atomic services since API version 15.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
NONE0Unknown.
LEFT1Left hand.
RIGHT2Right hand.

FocusDrawLevel18+

Enumerates the drawing levels of the focus box for a node.

Widget capability: This API can be used in ArkTS widgets since API version 18.

Atomic service API: This API can be used in atomic services since API version 18.

System capability: SystemCapability.ArkUI.ArkUI.Full

NameValueDescription
SELF0The focus box is drawn on the node's own layer.
TOP1The focus box is drawn on the topmost layer of the current instance's z-order.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArcButton

harmony 鸿蒙ArcSlider

harmony 鸿蒙Chip

harmony 鸿蒙ChipGroup

harmony 鸿蒙ComposeListItem

harmony 鸿蒙ComposeTitleBar

harmony 鸿蒙advanced.Counter

harmony 鸿蒙Dialog Box (Dialog)

harmony 鸿蒙DialogV2

harmony 鸿蒙DownloadFileButton

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/GqrIsa