Skip to content
VSCode Elements

Checkbox

This component is compatible with the standard <form> element. For more information on form submission and client-side validation, please refer to the Working with forms section.

<vscode-checkbox
label="Checkbox example"
value="testvalue1"
checked
></vscode-checkbox>
<vscode-checkbox
label="Indeterminate example"
indeterminate
></vscode-checkbox>

Hello World!

<vscode-checkbox>
<b>Hello</b> World!
</vscode-checkbox>

Toggle switches are typically used to enable or disable functions with immediate effect, while checkboxes often require a separate action (like a submit button) to apply changes.

Toggle switch
<vscode-checkbox toggle>Toggle switch</vscode-checkbox>