1# option
2
3>  **NOTE**
4>
5>  This component is supported since API version 4. Updates will be marked with a superscript to indicate their earliest API version.
6
7When used as a child component of [\<select>](js-components-basic-select.md), the **\<option>** component is used to display items in the drop-down list.
8
9
10When used as a child component of [\<menu>](js-components-basic-menu.md), the **\<option>** component is used to display items in the displayed menu.
11
12
13## Required Permissions
14
15None
16
17
18## Child Components
19
20Not supported
21
22
23## Attributes
24
25In addition to the [universal attributes](js-components-common-attributes.md), the following attributes are supported.
26
27| Name      | Type     | Default Value | Mandatory  | Description                                      |
28| -------- | ------- | ---- | ---- | ---------------------------------------- |
29| selected | boolean | -    | No   | Whether the option is the default option in the drop-down list. This attribute is available only when the parent component is **\<select>**.         |
30| value    | string  | -    | Yes   | Value of the option, which is used as the return value of the **selected** event of the **\<select>** or **\<menu>** parent component.<br>The value to be displayed on the UI must be put between the start and end tags, for example,<br>**\<option value="10">October\</option>**. |
31| icon     | string  | -    | No   | Icon resource path. This icon is displayed before the option text. The supported icon formats are JPG, PNG, and SVG.    |
32
33
34## Styles
35
36The following styles are supported.
37
38| Name             | Type                        | Default Value       | Mandatory  | Description                                      |
39| --------------- | -------------------------- | ---------- | ---- | ---------------------------------------- |
40| color           | &lt;color&gt;              | \#e6000000 | No   | Font color of the option.                               |
41| font-size       | &lt;length&gt;             | 16px       | No   | Font size of the option.                               |
42| allow-scale     | boolean                    | true       | No   | Whether the font size changes with the system's font size settings.<br>If the **config-changes** tag of **fontSize** is configured for abilities in the **config.json** file, the setting takes effect without application restart.|
43| font-weight     | number \| string | normal     | No   | Font weight of the option. For details, see **font-weight** of the [**\<text>**](js-components-basic-text.md#styles) component. |
44| text-decoration | string                     | none       | No   | Text modification of an option. For details, see **text-decoration** of the [**\<text>**](js-components-basic-text.md#styles) component. |
45| font-family     | string                     | sans-serif | No   | Font family, in which fonts are separated by commas (,). Each font is set using a font name or font family name. The first font in the family or the specified [custom font](js-components-common-customizing-font.md) is used for the text.|
46
47
48## Events
49
50Not supported
51
52
53## Methods
54
55Not supported
56
57
58## Example
59
60For details, see [Example in menu](js-components-basic-menu.md#example).
61