1{ 2 "name": "option", 3 "version": [ 4 { 5 "name": "v3.0" 6 } 7 ], 8 "syscap": [ 9 "SystemCapability.ArkUI.ArkUI.Full" 10 ], 11 "description": [ 12 { 13 "name": "When used as a child component of <select>, the <option> component is used to display items in the drop-down list. When used as a child component of <menu>, the <option> component is used to display items in the displayed menu. When used as a child component of <navigation-menu>, the <option> component is used to display the menu item in the title bar." 14 } 15 ], 16 "attributes": [ 17 { 18 "name": "selected", 19 "required": false, 20 "description": [ 21 { 22 "name": "Whether a value is the default value in the drop-down list. This attribute is available only when the parent component is <select>." 23 } 24 ], 25 "type": "enum", 26 "options": [ 27 { 28 "name": "true" 29 }, 30 { 31 "name": "false" 32 } 33 ] 34 }, 35 { 36 "name": "value", 37 "required": true, 38 "description": [ 39 { 40 "name": "Value of the selection item, which is used as the returned value of the selected event of the <select>, <navigation-bar>, or <menu> parent component. NOTE The value of UI in the option must be placed in the label, for example, <option value='10'>October</option>." 41 } 42 ], 43 "type": "string" 44 }, 45 { 46 "name": "icon", 47 "required": false, 48 "description": [ 49 { 50 "name": "Icon resource path. This icon is displayed before the option text. The supported icon formats are JPG, PNG, and SVG." 51 } 52 ], 53 "type": "string" 54 }, 55 { 56 "name": "action", 57 "version": [ 58 { 59 "name": "v6.0" 60 } 61 ], 62 "required": false, 63 "description": [ 64 { 65 "name": "Action of the option in the navigation bar. This attribute is available only when the parent component is <navigation-menu>. Available values include: popup: This option is hidden in More in the navigation bar. When a user clicks More, a pop-up window is displayed. show: This option is displayed on the navigation bar. When the icon is set, only the icon is displayed. When the number of options on the screen exceeds the maximum number (3, including the More icon) allowed by the navigation bar, the rest options are displayed in the pop-up window. When the number of options on the smart TV screen exceeds the maximum number (4) allowed by the navigation bar, the rest options will be discarded." 66 } 67 ], 68 "type": "enum", 69 "options": [ 70 { 71 "name": "popup" 72 }, 73 { 74 "name": "show" 75 } 76 ] 77 }, 78 { 79 "name": "shareid", 80 "required": false, 81 "description": [ 82 { 83 "name": "Used for the transition of shared elements and takes effect only when it is configured. This attribute cannot be modified after being set. list-item, image, text, button, label components are supported for the transition of shared elements." 84 } 85 ], 86 "type": "string" 87 }, 88 { 89 "name": "id", 90 "syscap": [ 91 "SystemCapability.ArkUI.ArkUI.Full", 92 "SystemCapability.ArkUI.ArkUI.Lite" 93 ], 94 "required": false, 95 "version": [ 96 { 97 "name": "v4.0" 98 } 99 ], 100 "description": [ 101 { 102 "name": "Unique ID of a component.", 103 "syscap": [ 104 "SystemCapability.ArkUI.ArkUI.Full", 105 "SystemCapability.ArkUI.ArkUI.Lite" 106 ] 107 } 108 ], 109 "type": "string" 110 }, 111 { 112 "name": "style", 113 "syscap": [ 114 "SystemCapability.ArkUI.ArkUI.Full", 115 "SystemCapability.ArkUI.ArkUI.Lite" 116 ], 117 "required": false, 118 "version": [ 119 { 120 "name": "v4.0" 121 } 122 ], 123 "description": [ 124 { 125 "name": "Style declaration of a component.", 126 "syscap": [ 127 "SystemCapability.ArkUI.ArkUI.Full", 128 "SystemCapability.ArkUI.ArkUI.Lite" 129 ] 130 } 131 ], 132 "type": "string" 133 }, 134 { 135 "name": "class", 136 "syscap": [ 137 "SystemCapability.ArkUI.ArkUI.Full", 138 "SystemCapability.ArkUI.ArkUI.Lite" 139 ], 140 "required": false, 141 "version": [ 142 { 143 "name": "v4.0" 144 } 145 ], 146 "description": [ 147 { 148 "name": "Style class of a component, which is used to refer to a style table.", 149 "syscap": [ 150 "SystemCapability.ArkUI.ArkUI.Full", 151 "SystemCapability.ArkUI.ArkUI.Lite" 152 ] 153 } 154 ], 155 "type": "string" 156 }, 157 { 158 "name": "ref", 159 "syscap": [ 160 "SystemCapability.ArkUI.ArkUI.Full", 161 "SystemCapability.ArkUI.ArkUI.Lite" 162 ], 163 "required": false, 164 "version": [ 165 { 166 "name": "v4.0" 167 } 168 ], 169 "description": [ 170 { 171 "name": "Used to register reference information of child elements or child components. The reference information is registered with the parent component on $refs.", 172 "syscap": [ 173 "SystemCapability.ArkUI.ArkUI.Full", 174 "SystemCapability.ArkUI.ArkUI.Lite" 175 ] 176 } 177 ], 178 "type": "string" 179 }, 180 { 181 "name": "disabled", 182 "required": false, 183 "version": [ 184 { 185 "name": "v4.0" 186 } 187 ], 188 "description": [ 189 { 190 "name": "Whether a component is disabled. If it is disabled, it cannot respond to user interaction." 191 } 192 ], 193 "type": "enum", 194 "options": [ 195 { 196 "name": "true" 197 }, 198 { 199 "name": "false" 200 } 201 ] 202 }, 203 { 204 "name": "focusable", 205 "required": false, 206 "version": [ 207 { 208 "name": "v4.0" 209 } 210 ], 211 "description": [ 212 { 213 "name": "Whether a component can gain focus. When focusable is set to true, the component can respond to focus events and key events. If a key event or click event is set for the component, this attribute is set to true automatically." 214 } 215 ], 216 "type": "enum", 217 "options": [ 218 { 219 "name": "true" 220 }, 221 { 222 "name": "false" 223 } 224 ] 225 }, 226 { 227 "name": "data-*", 228 "required": false, 229 "version": [ 230 { 231 "name": "v4.0" 232 } 233 ], 234 "description": [ 235 { 236 "name": "Attribute set for a component to facilitate data storage and reading." 237 } 238 ], 239 "type": "string" 240 }, 241 { 242 "name": "click-effect", 243 "required": false, 244 "version": [ 245 { 246 "name": "v5.0" 247 } 248 ], 249 "description": [ 250 { 251 "name": "Click effect complying with spring physics. Available values are as follows:\nspring-small: The button icon scales down to 90% of its size when it is selected. This is appropriate for small icons.\nspring-medium: The component scales down to 95% of its size when it is selected. This is appropriate for medium-sized components.spring-large: The button icon scales down and up by 95% of its size, which is appropriate to large icons." 252 } 253 ], 254 "type": "enum", 255 "options": [ 256 { 257 "name": "spring-small" 258 }, 259 { 260 "name": "spring-medium" 261 }, 262 { 263 "name": "spring-large" 264 } 265 ] 266 }, 267 { 268 "name": "voicelabel", 269 "required": false, 270 "version": [ 271 { 272 "name": "v4.0" 273 } 274 ], 275 "description": [ 276 { 277 "name": "Voice label. When a voice label is triggered, the click event of the component is triggered." 278 } 279 ], 280 "type": "string" 281 }, 282 { 283 "name": "subscriptflag", 284 "required": false, 285 "version": [ 286 { 287 "name": "v4.0" 288 } 289 ], 290 "description": [ 291 { 292 "name": "Voice subscript switch. Available values are as follows:\nauto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off.\non: Turn on the voice subscript.\noff: Turn off the voice subscript.If no customized subscript is set, the subscript is automatically accumulated from 1." 293 } 294 ], 295 "type": "enum", 296 "options": [ 297 { 298 "name": "auto" 299 }, 300 { 301 "name": "on" 302 }, 303 { 304 "name": "off" 305 } 306 ] 307 }, 308 { 309 "name": "subscriptlabel", 310 "required": false, 311 "version": [ 312 { 313 "name": "v4.0" 314 } 315 ], 316 "description": [ 317 { 318 "name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript." 319 } 320 ], 321 "type": "string" 322 }, 323 { 324 "name": "scenelabel", 325 "required": false, 326 "version": [ 327 { 328 "name": "v4.0" 329 } 330 ], 331 "description": [ 332 { 333 "name": "Available values are as follows:\nvideo: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc.\naudio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc.\npage: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc.\nswitch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc.common: Common scenario, which is triggered by the voiceLabel." 334 } 335 ], 336 "type": "enum", 337 "options": [ 338 { 339 "name": "video" 340 }, 341 { 342 "name": "audio" 343 }, 344 { 345 "name": "page" 346 }, 347 { 348 "name": "switch" 349 }, 350 { 351 "name": "common" 352 } 353 ] 354 }, 355 { 356 "name": "accessibilitygroup", 357 "required": false, 358 "version": [ 359 { 360 "name": "v4.0" 361 } 362 ], 363 "description": [ 364 { 365 "name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components." 366 } 367 ], 368 "type": "enum", 369 "options": [ 370 { 371 "name": "true" 372 }, 373 { 374 "name": "false" 375 } 376 ] 377 }, 378 { 379 "name": "accessibilitytext", 380 "required": false, 381 "version": [ 382 { 383 "name": "v4.0" 384 } 385 ], 386 "description": [ 387 { 388 "name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read." 389 } 390 ], 391 "type": "string" 392 }, 393 { 394 "name": "accessibilitydescription", 395 "required": false, 396 "version": [ 397 { 398 "name": "v4.0" 399 } 400 ], 401 "description": [ 402 { 403 "name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected." 404 } 405 ], 406 "type": "string" 407 }, 408 { 409 "name": "accessibilityimportance", 410 "required": false, 411 "version": [ 412 { 413 "name": "v4.0" 414 } 415 ], 416 "description": [ 417 { 418 "name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents.\nyes: The current component is selectable for the accessibility service.no: The current component is not selectable for the accessibility service." 419 } 420 ], 421 "type": "string" 422 }, 423 { 424 "name": "for", 425 "syscap": [ 426 "SystemCapability.ArkUI.ArkUI.Full", 427 "SystemCapability.ArkUI.ArkUI.Lite" 428 ], 429 "required": false, 430 "version": [ 431 { 432 "name": "v4.0" 433 } 434 ], 435 "description": [ 436 { 437 "name": "Expands the current element based on the configured data list.", 438 "syscap": [ 439 "SystemCapability.ArkUI.ArkUI.Full", 440 "SystemCapability.ArkUI.ArkUI.Lite" 441 ] 442 } 443 ], 444 "type": "string" 445 }, 446 { 447 "name": "tid", 448 "syscap": [ 449 "SystemCapability.ArkUI.ArkUI.Full", 450 "SystemCapability.ArkUI.ArkUI.Lite" 451 ], 452 "required": false, 453 "version": [ 454 { 455 "name": "v4.0" 456 } 457 ], 458 "description": [ 459 { 460 "name": "The tid attribute accelerates the for loop and improves the re-rendering efficiency when data in a loop changes.\nThe tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid=\"id\" indicates that the id attribute of each element is its unique ID.", 461 "syscap": [ 462 "SystemCapability.ArkUI.ArkUI.Full", 463 "SystemCapability.ArkUI.ArkUI.Lite" 464 ] 465 } 466 ], 467 "type": "string" 468 }, 469 { 470 "name": "if", 471 "syscap": [ 472 "SystemCapability.ArkUI.ArkUI.Full", 473 "SystemCapability.ArkUI.ArkUI.Lite" 474 ], 475 "required": false, 476 "version": [ 477 { 478 "name": "v4.0" 479 } 480 ], 481 "description": [ 482 { 483 "name": "Whether the element is added or removed.", 484 "syscap": [ 485 "SystemCapability.ArkUI.ArkUI.Full", 486 "SystemCapability.ArkUI.ArkUI.Lite" 487 ] 488 } 489 ], 490 "type": "enum", 491 "options": [ 492 { 493 "name": "true" 494 }, 495 { 496 "name": "false" 497 } 498 ] 499 }, 500 { 501 "name": "dir", 502 "version": [ 503 { 504 "name": "v6.0" 505 } 506 ], 507 "required": false, 508 "description": [ 509 { 510 "name": "Sets the element layout mode. The rtl, ltr, and auto attributes can be set." 511 } 512 ], 513 "type": "enum", 514 "options": [ 515 { 516 "name": "ltr" 517 }, 518 { 519 "name": "rtl" 520 }, 521 { 522 "name": "auto" 523 } 524 ] 525 }, 526 { 527 "name": "elif", 528 "syscap": [ 529 "SystemCapability.ArkUI.ArkUI.Full", 530 "SystemCapability.ArkUI.ArkUI.Lite" 531 ], 532 "required": false, 533 "version": [ 534 { 535 "name": "v4.0" 536 } 537 ], 538 "description": [], 539 "type": "enum", 540 "options": [ 541 { 542 "name": "true" 543 }, 544 { 545 "name": "false" 546 } 547 ] 548 }, 549 { 550 "name": "else", 551 "syscap": [ 552 "SystemCapability.ArkUI.ArkUI.Full", 553 "SystemCapability.ArkUI.ArkUI.Lite" 554 ], 555 "required": false, 556 "version": [ 557 { 558 "name": "v4.0" 559 } 560 ], 561 "description": [], 562 "type": "string" 563 }, 564 { 565 "name": "show", 566 "syscap": [ 567 "SystemCapability.ArkUI.ArkUI.Full", 568 "SystemCapability.ArkUI.ArkUI.Lite" 569 ], 570 "required": false, 571 "version": [ 572 { 573 "name": "v4.0" 574 } 575 ], 576 "description": [ 577 { 578 "name": "Whether the element is displayed or hidden.", 579 "syscap": [ 580 "SystemCapability.ArkUI.ArkUI.Full", 581 "SystemCapability.ArkUI.ArkUI.Lite" 582 ] 583 } 584 ], 585 "type": "enum", 586 "options": [ 587 { 588 "name": "true" 589 }, 590 { 591 "name": "false" 592 } 593 ] 594 } 595 ], 596 "events": [], 597 "supportedSubComponents": false, 598 "supportedSubComponentsRestriction": [], 599 "unSupportSubComponentsRestriction": [], 600 "parentComponentsRestriction": [] 601}