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.
Basic example
Section titled “Basic example”<vscode-checkbox label="Checkbox example" value="testvalue1" checked></vscode-checkbox>
Indeterminate state
Section titled “Indeterminate state”<vscode-checkbox label="Indeterminate example" indeterminate></vscode-checkbox>
Slotted content
Section titled “Slotted content”Hello World!
<vscode-checkbox> <b>Hello</b> World!</vscode-checkbox>
Toggle switch
Section titled “Toggle switch”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.
<vscode-checkbox toggle>Toggle switch</vscode-checkbox>