Visual Studio Code Option

March 8, 2023 ยท View on GitHub

The vscode-option is a web component implementation of an option.

Option hero

Usage

The vscode-option component will only provide internals related to form association when used within a form-associated component. See the vscode-dropdown component for more details.

Implementation

Interactive component examples

Attributes

AttributeTypeDescription
disabledbooleanThe disabled state of the option.
selectedbooleanThe selected attribute value. This sets the initial selected value.
valuestringThe initial value of the option.

Basic Option

<vscode-option>Option Label</vscode-option>

Disabled Attribute

<vscode-option disabled>Option Label</vscode-option>

Selected Attribute

<vscode-option selected>Option Label</vscode-option>

Value Attribute

<vscode-option value="example-option-value">Option Label</vscode-option>