Skip to content

Radio

Tag name: <vscode-radio>

When participating in a form, it supports the :invalid pseudo class. Otherwise the error styles can be applied through the invalid property.

Properties

autofocusreflects
Nameautofocus
Attributeautofocus
Type

boolean

Default

false

checkedreflects
Namechecked
Attributechecked
Type

boolean

Default

false

defaultCheckedreflects
NamedefaultChecked
Attributedefault-checked
Type

boolean

Default

false

disabledreflects
Namedisabled
Attributedisabled
Type

boolean

Default

false

focusedreflects
Namefocused
Attributefocused
Type

boolean

Default

false

formreadonly
Nameform
Type

HTMLFormElement | null

invalidreflects
Nameinvalid
Attributeinvalid
Type

boolean

Default

false

label
Namelabel
Attributelabel
Type

string

Description

Label text. It is only applied if component's innerHTML doesn't contain any text.

namereflects
Namename
Attributename
Type

string

Default

''

Description

Name which is used as a variable name in the data of the form-container.

requiredreflects
Namerequired
Attributerequired
Type

boolean

Default

false

validationMessagereadonly
NamevalidationMessage
Type

string

validityreadonly
Namevalidity
Type

ValidityState

value
Namevalue
Attributevalue
Type

string

Default

''

versionreadonly
Nameversion
Type

string

Description

VSCode Elements version

willValidatereadonly
NamewillValidate
Type

boolean

Methods

checkValidity() : boolean
NamecheckValidity
reportValidity() : boolean
NamereportValidity

Events

change
Namechange
TypeEvent
Description

Dispatched when checked state is changed.

invalid
Nameinvalid
TypeEvent
Description

Dispatched when the element is invalid and checkValidity() has been called or the form containing this element is submitted. MDN Reference

vsc-changedeprecated
Namevsc-change
TypeCustomEvent
Description

CSS Custom Properties

--vscode-focusBorder
Name--vscode-focusBorder
Default value#0078d4
--vscode-font-family
Name--vscode-font-family
Default valuesans-serif
--vscode-font-size
Name--vscode-font-size
Default value13px
--vscode-font-weight
Name--vscode-font-weight
Default valuenormal
--vscode-inputValidation-errorBackground
Name--vscode-inputValidation-errorBackground
Default value#5a1d1d
--vscode-inputValidation-errorBorder
Name--vscode-inputValidation-errorBorder
Default value#be1100
--vscode-settings-checkboxBackground
Name--vscode-settings-checkboxBackground
Default value#313131
--vscode-settings-checkboxBorder
Name--vscode-settings-checkboxBorder
Default value#3c3c3c
--vscode-settings-checkboxForeground
Name--vscode-settings-checkboxForeground
Default value#cccccc