Visual Studio Code Radio

October 13, 2023 · View on GitHub

The vscode-radio is a web component implementation of a radio element.

Radio hero

Usage

For guidelines on usage in an extension, see the vscode-radio-group component.

Implementation

Interactive component examples

Attributes

AttributeTypeDescription
checkedbooleanWhen true, the radio is toggled on.
disabledbooleanPrevents the user from interacting with the radio––it cannot be pressed or focused.
readonlybooleanIndicates whether the radio is checked or not.
valuestringThe string to use as the value of the radio.

Basic Radio

<vscode-radio>Radio Label</vscode-radio>

Checked Attribute

<vscode-radio checked>Radio Label</vscode-radio>

Read Only Attribute

<vscode-radio readonly>Radio Label</vscode-radio>

Disabled Attribute

<vscode-radio disabled>Radio Label</vscode-radio>

Value Attribute

<vscode-radio value="some-value">Radio Label</vscode-radio>