• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Enums
2
3## Color
4
5Since API version 9, this API is supported in ArkTS widgets.
6
7| Color                | Value  | Illustration                                                    |
8| ------------------------ | -------- | ------------------------------------------------------------ |
9| Black                    | 0x000000 | ![en-us_image_0000001219864153](figures/en-us_image_0000001219864153.png) |
10| Blue                     | 0x0000ff | ![en-us_image_0000001174104404](figures/en-us_image_0000001174104404.png) |
11| Brown                    | 0xa52a2a | ![en-us_image_0000001219744201](figures/en-us_image_0000001219744201.png) |
12| Gray                     | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) |
13| Grey                     | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) |
14| Green                    | 0x008000 | ![en-us_image_0000001174422914](figures/en-us_image_0000001174422914.png) |
15| Orange                   | 0xffa500 | ![en-us_image_0000001219662661](figures/en-us_image_0000001219662661.png) |
16| Pink                     | 0xffc0cb | ![en-us_image_0000001219662663](figures/en-us_image_0000001219662663.png) |
17| Red                      | 0xff0000 | ![en-us_image_0000001219662665](figures/en-us_image_0000001219662665.png) |
18| White                    | 0xffffff | ![en-us_image_0000001174582866](figures/en-us_image_0000001174582866.png) |
19| Yellow                   | 0xffff00 | ![en-us_image_0000001174582864](figures/en-us_image_0000001174582864.png) |
20| Transparent<sup>9+</sup> | rgba(0,0,0,0)  |  Transparent                                                                  |
21
22## ImageFit
23
24Since API version 9, this API is supported in ArkTS widgets.
25
26| Name     | Description                                                        |
27| --------- | ------------------------------------------------------------ |
28| Contain   | The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries.  |
29| Cover     | The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.|
30| Auto      | The image is scaled automatically to fit the display area.                                               |
31| Fill      | The image is scaled to fill the display area, and its aspect ratio is not retained.            |
32| ScaleDown | The image is displayed with its aspect ratio retained, in a size smaller than or equal to the original size.                      |
33| None      | The original size is retained.                                          |
34
35## BorderStyle
36
37Since API version 9, this API is supported in ArkTS widgets.
38
39| Name  | Description                                           |
40| ------ | ----------------------------------------------- |
41| Dotted | Dotted border. The radius of a dot is half of **borderWidth**.|
42| Dashed | Dashed border.                     |
43| Solid  | Solid border.                               |
44
45## LineJoinStyle
46
47Since API version 9, this API is supported in ArkTS widgets.
48
49| Name | Description                |
50| ----- | -------------------- |
51| Bevel | Bevel is used to connect paths.|
52| Miter | Miter is used to connect paths.|
53| Round | Round is used to connect paths.|
54
55## TouchType
56
57Since API version 9, this API is supported in ArkTS widgets.
58
59| Name  | Description                          |
60| ------ | ------------------------------ |
61| Down   | A finger is pressed.              |
62| Up     | A finger is lifted.              |
63| Move   | A finger moves on the screen in pressed state.|
64| Cancel | A touch event is canceled.          |
65
66## MouseButton
67
68Since API version 9, this API is supported in ArkTS widgets.
69
70| Name   | Description            |
71| ------- | ---------------- |
72| Left    | Left button on the mouse.      |
73| Right   | Right button on the mouse.      |
74| Middle  | Middle button on the mouse.      |
75| Back    | Back button on the left of the mouse.|
76| Forward | Forward button on the left of the mouse.|
77| None    | No button.        |
78
79## MouseAction
80
81Since API version 9, this API is supported in ArkTS widgets.
82
83| Name   | Description          |
84| ------- | -------------- |
85| Press   | The mouse button is pressed.|
86| Release | The mouse button is released.|
87| Move    | The mouse cursor moves.    |
88| Hover    | The mouse pointer is hovered on an element.    |
89
90## Curve
91
92Since API version 9, this API is supported in ArkTS widgets.
93
94| Name               | Description                                                        |
95| ------------------- | ------------------------------------------------------------ |
96| Linear              | The animation speed keeps unchanged.                          |
97| Ease                | The 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.|
98| EaseIn              | The 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.      |
99| EaseOut             | The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used.      |
100| EaseInOut           | The animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used.|
101| FastOutSlowIn       | The animation uses the standard cubic-bezier curve (0.4, 0.0, 0.2, 1.0).                |
102| LinearOutSlowIn     | The animation uses the deceleration cubic-bezier curve (0.0, 0.0, 0.2, 1.0).                |
103| FastOutLinearIn     | The animation uses the acceleration cubic-bezier curve (0.4, 0.0, 1.0, 1.0).                |
104| ExtremeDeceleration | The animation uses the extreme deceleration cubic-bezier curve (0.0, 0.0, 0.0, 1.0).                |
105| Sharp               | The animation uses the sharp cubic-bezier curve (0.33, 0.0, 0.67, 1.0).              |
106| Rhythm              | The animation uses the rhythm cubic-bezier curve (0.7, 0.0, 0.2, 1.0).                |
107| Smooth              | The animation uses the smooth cubic-bezier curve (0.4, 0.0, 0.4, 1.0).                |
108| Friction            | The animation uses the friction cubic-bezier curve (0.2, 0.0, 0.2, 1.0).                 |
109
110## AnimationStatus
111
112Since API version 9, this API is supported in ArkTS widgets.
113
114| Name   | Description              |
115| ------- | ------------------ |
116| Initial | The animation is in the initial state.    |
117| Running | The animation is being played.|
118| Paused  | The animation is paused.|
119| Stopped | The animation is stopped.|
120
121## FillMode
122
123Since API version 9, this API is supported in ArkTS widgets.
124
125| Name     | Description                                                        |
126| --------- | ------------------------------------------------------------ |
127| None      | Before execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state.|
128| Forwards  | The target component retains the state set by the last keyframe encountered during execution of the animation.                |
129| Backwards | The 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.|
130| Both      | The animation follows the rules for both **Forwards** and **Backwards**, extending the animation attributes in both directions.|
131
132## PlayMode
133
134Since API version 9, this API is supported in ArkTS widgets.
135
136| Name            | Description                                                        |
137| ---------------- | ------------------------------------------------------------ |
138| Normal           | The animation is played forwards.                                            |
139| Reverse          | The animation is played backwards.                                              |
140| Alternate        | The animation is played forwards for an odd number of times (1, 3, 5...) and backwards for an even number of times (2, 4, 6...).|
141| AlternateReverse | The animation is played backwards for an odd number of times (1, 3, 5...) and forwards for an even number of times (2, 4, 6...).|
142
143## KeyType
144
145Since API version 9, this API is supported in ArkTS widgets.
146
147| Name| Description      |
148| ---- | ---------- |
149| Down | The key is pressed.|
150| Up   | The key is released.|
151
152## KeySource
153
154Since API version 9, this API is supported in ArkTS widgets.
155
156| Name    | Description                |
157| -------- | -------------------- |
158| Unknown  | Unknown input device.  |
159| Keyboard | The input device is a keyboard.|
160
161## Edge
162
163| Name    | Description                  |
164| -------- | ---------------------- |
165| Top      | Top edge in the vertical direction.<br>Since API version 9, this API is supported in ArkTS widgets.|
166| Center<sup>(deprecated) </sup>   | Center position in the vertical direction.<br> This API is deprecated since API version 9.|
167| Bottom   | Bottom edge in the vertical direction.<br>Since API version 9, this API is supported in ArkTS widgets.|
168| Baseline<sup>(deprecated) </sup> | Text baseline position in the cross axis direction.<br> This API is deprecated since API version 9.|
169| Start    | Start position in the horizontal direction.<br>Since API version 9, this API is supported in ArkTS widgets.|
170| Middle<sup>(deprecated) </sup>   | Center position in the horizontal direction.<br> This API is deprecated since API version 9.|
171| End      | End position in the horizontal direction.<br>Since API version 9, this API is supported in ArkTS widgets.|
172
173## Week
174
175Since API version 9, this API is supported in ArkTS widgets.
176
177| Name    | Description                  |
178| -------- | ---------------------- |
179| Mon      | Monday.               |
180| Tue      | Tuesday.               |
181| Wed      | Wednesday.               |
182| Thur     | Thursday.               |
183| Fri      | Friday.               |
184| Sat      | Saturday.               |
185| Sun      | Sunday.               |
186
187## Direction
188
189Since API version 9, this API is supported in ArkTS widgets.
190
191| Name| Description                  |
192| ---- | ---------------------- |
193| Ltr  | Components are arranged from left to right.    |
194| Rtl  | Components are arranged from right to left.    |
195| Auto | The default layout direction is used.|
196
197## BarState
198
199Since API version 9, this API is supported in ArkTS widgets.
200
201| Name| Description                            |
202| ---- | -------------------------------- |
203| Off  | Not displayed.                        |
204| On   | Always displayed.                      |
205| Auto | Displayed when the screen is touched and hidden after 2s.|
206
207## EdgeEffect
208
209Since API version 9, this API is supported in ArkTS widgets.
210
211| Name  | Description                                                        |
212| ------ | ------------------------------------------------------------ |
213| Spring | Spring 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.|
214| Fade   | Fade effect. When at one of the edges, the component produces a fade effect.                    |
215| None   | No effect when the component is at one of the edges.                                        |
216
217## Alignment
218
219Since API version 9, this API is supported in ArkTS widgets.
220
221| Name       | Description            |
222| ----------- | ---------------- |
223| TopStart    | Top start.    |
224| Top         | Horizontally centered on the top.  |
225| TopEnd      | Top end.      |
226| Start       | Vertically centered start.|
227| Center      | Horizontally and vertically centered.|
228| End         | Vertically centered end.  |
229| BottomStart | Bottom start.    |
230| Bottom      | Horizontally centered on the bottom.  |
231| BottomEnd   | Bottom end.      |
232
233## TransitionType
234
235Since API version 9, this API is supported in ArkTS widgets.
236
237| Name  | Description                                              |
238| ------ | -------------------------------------------------- |
239| All    | The transition takes effect in all scenarios.|
240| Insert | The transition takes effect when a component is inserted or displayed.|
241| Delete | The transition takes effect when a component is deleted or hidden.|
242
243## RelateType
244
245Since API version 9, this API is supported in ArkTS widgets.
246
247| Name  | Description                             |
248| ------ | ------------------------------- |
249| FILL    | The current child component is scaled to fill the parent component.     |
250| FIT     | The current child component is scaled to adapt to the parent component.   |
251
252## Visibility
253
254Since API version 9, this API is supported in ArkTS widgets.
255
256| Name   | Description                            |
257| ------- | -------------------------------- |
258| Hidden  | The component is hidden, and a placeholder is used for it in the layout.      |
259| Visible | The component is visible.                          |
260| None    | The component is hidden. It is not involved in the layout, and no placeholder is used for it.|
261
262## LineCapStyle
263
264Since API version 9, this API is supported in ArkTS widgets.
265
266| Name  | Description                |
267| ------ | -------------------- |
268| Butt   | The ends of the line are squared off, and the line does not extend beyond its two endpoints.|
269| Round  | The line is extended at the endpoints by a half circle whose diameter is equal to the line width.|
270| Square | The 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.|
271
272## Axis
273
274Since API version 9, this API is supported in ArkTS widgets.
275
276| Name      | Description        |
277| ---------- | ------------ |
278| Vertical   | Vertical direction.|
279| Horizontal | Horizontal direction.|
280
281## HorizontalAlign
282
283Since API version 9, this API is supported in ArkTS widgets.
284
285| Name  | Description                    |
286| ------ | ------------------------ |
287| Start  | Aligned with the start edge in the same direction as the language in use.|
288| Center | Aligned with the center. This is the default alignment mode.|
289| End    | Aligned with the end edge in the same direction as the language in use.  |
290
291## FlexAlign
292
293Since API version 9, this API is supported in ArkTS widgets.
294
295| Name        | Description                                                        |
296| ------------ | ------------------------------------------------------------ |
297| Start        | The 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.|
298| Center       | The 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.|
299| End          | The 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.|
300| SpaceBetween | The 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.|
301| SpaceAround  | The 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.|
302| SpaceEvenly  | The 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.|
303
304## ItemAlign
305
306Since API version 9, this API is supported in ArkTS widgets.
307
308| Name    | Description                                                        |
309| -------- | ------------------------------------------------------------ |
310| Auto     | The default configuration of the flex container is used.                                    |
311| Start    | The items in the flex container are aligned with the cross-start edge.                      |
312| Center   | The items in the flex container are centered along the cross axis.                      |
313| End      | The items in the flex container are aligned with the cross-end edge.                      |
314| Stretch  | The 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 with no size set are stretched to the container size.|
315| Baseline | The items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis.                  |
316
317## FlexDirection
318
319Since API version 9, this API is supported in ArkTS widgets.
320
321| Name         | Description                          |
322| ------------- | ------------------------------ |
323| Row           | The child components are arranged in the same direction as the main axis runs along the rows.|
324| RowReverse    | The child components are arranged opposite to the **Row** direction.   |
325| Column        | The child components are arranged in the same direction as the main axis runs down the columns.|
326| ColumnReverse | The child components are arranged opposite to the **Column** direction.    |
327
328## FlexWrap
329
330Since API version 9, this API is supported in ArkTS widgets.
331
332| Name       | Description                                             |
333| ----------- | ------------------------------------------------- |
334| NoWrap      | The child components in the flex container are arranged in a single line, and they cannot overflow.  |
335| Wrap        | The child components in the flex container are arranged in multiple lines, and they may overflow.    |
336| WrapReverse | The child components in the flex container are reversely arranged in multiple lines, and they may overflow.|
337
338## VerticalAlign
339
340Since API version 9, this API is supported in ArkTS widgets.
341
342| Name  | Description                    |
343| ------ | ------------------------ |
344| Top    | Top aligned.              |
345| Center | Center aligned. This is the default alignment mode.|
346| Bottom | Bottom aligned.              |
347
348## ImageRepeat
349
350Since API version 9, this API is supported in ArkTS widgets.
351
352| Name    | Description                      |
353| -------- | -------------------------- |
354| X        | The image is repeatedly drawn only along the horizontal axis.|
355| Y        | The image is repeatedly drawn only along the vertical axis.|
356| XY       | The image is repeatedly drawn along both axes.  |
357| NoRepeat | The image is not repeatedly drawn.          |
358
359## ImageSize
360
361Since API version 9, this API is supported in ArkTS widgets.
362
363| Type   | Description                                                        |
364| ------- | ------------------------------------------------------------ |
365| Cover   | Default value. The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.|
366| Contain | The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries.  |
367| Auto    | The original image aspect ratio is retained.                                        |
368
369## GradientDirection
370
371Since API version 9, this API is supported in ArkTS widgets.
372
373| Name       | Description      |
374| ----------- | ---------- |
375| Left        | The gradient direction is from right to left.|
376| Top         | The gradient direction is from bottom to top.|
377| Right       | The gradient direction is from left to right.|
378| Bottom      | The gradient direction is from top to bottom.|
379| LeftTop     | The gradient direction is upper left.    |
380| LeftBottom  | The gradient direction is lower left.    |
381| RightTop    | The gradient direction is upper right.    |
382| RightBottom | The gradient direction is lower right.    |
383| None        | No gradient.      |
384
385## SharedTransitionEffectType
386
387Since API version 9, this API is supported in ArkTS widgets.
388
389| Name       | Description      |
390| ----------- | ---------- |
391| Static        | The 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.|
392| Exchange      | The element is relocated and scaled properly on the target page.|
393
394## FontStyle
395
396Since API version 9, this API is supported in ArkTS widgets.
397
398| Name  | Description            |
399| ------ | ---------------- |
400| Normal | Standard font style.|
401| Italic | Italic font style.|
402
403## FontWeight
404
405Since API version 9, this API is supported in ArkTS widgets.
406
407| Name   | Description          |
408| ------- | -------------- |
409| Lighter | The font weight is lighter.    |
410| Normal  | The font weight is normal.|
411| Regular | The font weight is regular.|
412| Medium  | The font weight is medium.|
413| Bold    | The font weight is bold.    |
414| Bolder  | The font weight is bolder.  |
415
416## TextAlign
417
418Since API version 9, this API is supported in ArkTS widgets.
419
420| Name                 | Description          |
421| --------------------- | -------------- |
422| Start                 | Aligned with the start.|
423| Center                | Horizontally centered.|
424| End                   | Aligned with the end.|
425
426## TextOverflow
427
428Since API version 9, this API is supported in ArkTS widgets.
429
430| Name                 | Description                                  |
431| --------------------- | -------------------------------------- |
432| Clip                  | Extra-long text is clipped.              |
433| Ellipsis              | An ellipsis (...) is used to represent text overflow.|
434| None | No clipping or ellipsis is used for text overflow. |
435
436## TextDecorationType
437
438Since API version 9, this API is supported in ArkTS widgets.
439
440| Name       | Description              |
441| ----------- | ------------------ |
442| Underline   | Line under the text.  |
443| LineThrough | Line through the text.|
444| Overline    | Line over the text.  |
445| None        | No decorative lines.|
446
447## TextCase
448
449Since API version 9, this API is supported in ArkTS widgets.
450
451| Name     | Description                |
452| --------- | -------------------- |
453| Normal    | The original case of the text is retained.|
454| LowerCase | All letters in the text are in lowercase.    |
455| UpperCase | All letters in the text are in uppercase.    |
456
457## ResponseType<sup>8+</sup>
458
459Since API version 9, this API is supported in ArkTS widgets.
460
461| Name      | Description                      |
462| ---------- | -------------------------- |
463| LongPress  | The menu is displayed when the component is long-pressed.    |
464| RightClick | The menu is displayed when the component is right-clicked.|
465
466## HoverEffect<sup>8+</sup>
467
468Since API version 9, this API is supported in ArkTS widgets.
469
470| Name     | Description                        |
471| --------- | ---------------------------- |
472| Auto      | Default hover effect.|
473| Scale     | Scale effect.              |
474| Highlight | Background fade-in and fade-out effect.    |
475| None      | No effect.                |
476
477## Placement<sup>8+</sup>
478
479Since API version 9, this API is supported in ArkTS widgets.
480
481| Name         | Description                                                        |
482| ------------- | ------------------------------------------------------------ |
483| Left          | The popup is on the left of the component, vertically aligned with the component on the left.                  |
484| Right         | The popup is on the right of the component, vertically aligned with the component on the right.                  |
485| Top           | The popup is at the top of the component, horizontally aligned with the component at the top.                  |
486| Bottom        | The popup is at the bottom of the component, horizontally aligned with the component at the bottom.                  |
487| TopLeft       | The popup is at the top of the component and, since API version 9, aligned with the left of the component.|
488| TopRight      | The popup is at the top of the component and, since API version 9, aligned with the right of the component.|
489| BottomLeft    | The popup is at the bottom of the component and, since API version 9, aligned with the left of the component.|
490| BottomRight   | The popup is at the bottom of the component and, since API version 9, aligned with the right of the component.|
491| LeftTop9+     | The popup is on the left of the component and aligned with the top of the component.                  |
492| LeftBottom9+  | The popup is on the left of the component and aligned with the bottom of the component.                  |
493| RightTop9+    | The popup is on the right of the component and aligned with the top of the component.                  |
494| RightBottom9+ | The popup is on the right of the component and aligned with the bottom of the component.                  |
495
496## CopyOptions<sup>9+</sup>
497
498Since API version 9, this API is supported in ArkTS widgets.
499
500| Name       | Description                |
501| ----------- | -------------------- |
502| None        | Copy is not allowed.    |
503| InApp       | Intra-application copy is allowed.|
504| LocalDevice | Intra-device copy is allowed.|
505
506## HitTestMode<sup>9+</sup>
507
508Since API version 9, this API is supported in ArkTS widgets.
509
510| Name       | Description                |
511| ----------- | -------------------- |
512| Default     | Both 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.  |
513| Block       | The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit test.       |
514| Transparent | Both 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.|
515| None        | The 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.|
516