Checkbox
Tag name: <vscode-checkbox>
Allows users to select one or more options from a set. When participating in a form, it supports
the :invalid
pseudo class. Otherwise the error styles can be applied through the invalid
property.
Properties
autofocusreflects
Name | autofocus |
---|---|
Attribute | autofocus |
Type |
|
Default |
|
Description | Automatically focus on the element when the page loads. |
checkedreflects
Name | checked |
---|---|
Attribute | checked |
Type |
|
defaultCheckedreflects
Name | defaultChecked |
---|---|
Attribute | default-checked |
Type |
|
Default |
|
Description | The element's initial checked state, which will be restored when the containing form is reset. |
disabledreflects
Name | disabled |
---|---|
Attribute | disabled |
Type |
|
Default |
|
focusedreflects
Name | focused |
---|---|
Attribute | focused |
Type |
|
Default |
|
formreadonly
Name | form |
---|---|
Type |
|
indeterminatereflects
Name | indeterminate |
---|---|
Attribute | indeterminate |
Type |
|
Default |
|
invalidreflects
Name | invalid |
---|---|
Attribute | invalid |
Type |
|
Default |
|
label
Name | label |
---|---|
Attribute | label |
Type |
|
Description | Label text. It is only applied if component's innerHTML doesn't contain any text. |
namereflects
Name | name |
---|---|
Attribute | name |
Type |
|
Default |
|
requiredreflects
Name | required |
---|---|
Attribute | required |
validationMessagereadonly
Name | validationMessage |
---|---|
Type |
|
validityreadonly
Name | validity |
---|---|
Type |
|
value
Name | value |
---|---|
Attribute | value |
Type |
|
Default |
|
Description | Associate a value to the checkbox. According to the native checkbox specification, If the component participates in a form:
|
versionreadonly
Name | version |
---|---|
Type |
|
Description | VSCode Elements version |
willValidatereadonly
Name | willValidate |
---|---|
Type |
|
Methods
checkValidity()
: boolean
Name | checkValidity |
---|---|
Description | Returns |
reportValidity()
: boolean
Name | reportValidity |
---|---|
Description | Returns |
Events
change
Name | change |
---|---|
Type | Event |
Description | Dispatched when checked state is changed. The event is bubbled, so it can be listened on a parent element like the |
invalid
Name | invalid |
---|---|
Type | Event |
Description | Dispatched when the element is invalid and |
vsc-changedeprecated
Name | vsc-change |
---|---|
Type | CustomEvent |
Description |
CSS Custom Properties
--vsc-foreground-translucent
Name | --vsc-foreground-translucent |
---|---|
Description | Label font color. 90% transparency version of |
--vscode-focusBorder
Name | --vscode-focusBorder |
---|
--vscode-font-family
Name | --vscode-font-family |
---|
--vscode-font-size
Name | --vscode-font-size |
---|
--vscode-font-weight
Name | --vscode-font-weight |
---|
--vscode-settings-checkboxBackground
Name | --vscode-settings-checkboxBackground |
---|
--vscode-settings-checkboxBorder
Name | --vscode-settings-checkboxBorder |
---|
--vscode-settings-checkboxForeground
Name | --vscode-settings-checkboxForeground |
---|