• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Picker Common APIs
2<!--Kit: ArkUI-->
3<!--Subsystem: ArkUI-->
4<!--Owner: @luoying_ace_admin-->
5<!--Designer: @weixin_52725220-->
6<!--Tester: @xiong0104-->
7<!--Adviser: @HelloCrease-->
8
9This topic covers the common APIs of picker components.
10
11>  **NOTE**
12>
13>  The initial APIs of this module are supported since API version 10. Updates will be marked with a superscript to indicate their earliest API version.
14
15## PickerTextStyle
16
17Defines the text style configuration for the picker component.
18
19**Atomic service API**: This API can be used in atomic services since API version 11.
20
21**System capability**: SystemCapability.ArkUI.ArkUI.Full
22
23| Name  | Type                                    | Read-Only| Optional| Description                     |
24| ----- | ---------------------------------------- | ---- | ------------------------- | ------------------------- |
25| color | [ResourceColor](ts-types.md#resourcecolor) | No  | Yes  | Text color.                    |
26| font  | [Font](ts-types.md#font)                 | No  | Yes  | Text style.|
27
28## PickerDialogButtonStyle<sup>12+</sup>
29
30Defines the picker button style.
31
32**Atomic service API**: This API can be used in atomic services since API version 12.
33
34**System capability**: SystemCapability.ArkUI.ArkUI.Full
35
36| Name  | Type                                    | Read-Only| Optional| Description                     |
37| ----- | ---------------------------------------- | ---- | ------------------------- | ------------------------- |
38| type | [ButtonType](ts-basic-components-button.md#buttontype) | No  | Yes  | Button type.                    |
39| style  | [ButtonStyleMode](ts-basic-components-button.md#buttonstylemode11)                 | No  | Yes  | Style and importance of the button.|
40| role | [ButtonRole](ts-basic-components-button.md#buttonrole12) | No  | Yes  | Role of the button.                    |
41| fontSize  | [Length](ts-types.md#length)                 | No  | Yes  | Font size of the button.|
42| fontColor | [ResourceColor](ts-types.md#resourcecolor) | No  | Yes  | Color of button text.                    |
43| fontWeight  | [FontWeight](ts-appendix-enums.md#fontweight) \| number \| string| No  | Yes  | Font weight of button text For the number type, the value ranges from 100 to 900, at an interval of 100. A larger value indicates a heavier font weight. For the string type, only strings that represent a number, for example, **"200"**, and the following enumerated values of **FontWeight** are supported: **"bold"**, **"bolder"**, **"lighter"**, **"regular"**, and **"medium"**.|
44| fontStyle | [FontStyle](ts-appendix-enums.md#fontstyle) | No  | Yes  | Font style of button text.                    |
45| fontFamily  |  [Resource](ts-types.md#resource) \| string  | No  | Yes  | Font family. The 'HarmonyOS Sans' font and [registered custom fonts](../js-apis-font.md) are supported.|
46| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | No  | Yes  | Background color of the button.                    |
47| borderRadius  | [Length](ts-types.md#length) \| [BorderRadiuses](ts-types.md#borderradiuses9)| No  | Yes  | Corner radius of the button.|
48| primary  | boolean | No  | Yes  | Whether the button responds to the **Enter** key by default when the dialog box has focus and the **Tab** key is not pressed for sequential focus navigation.|
49
50## DateRange<sup>19+</sup>
51
52Defines the date range, which specifies the start and end dates.
53
54**Atomic service API**: This API can be used in atomic services since API version 19.
55
56**System capability**: SystemCapability.ArkUI.ArkUI.Full
57
58| Name     | Type      | Read-Only     | Optional  | Description                           |
59| ----------- | ---------- | ------| --------------------------------- | --------------------------------- |
60| start | Date | No| Yes  | Start date of the date range.|
61| end | Date | No  | Yes  | End date of the date range.|
62