Toolbar Button
To use the icons, the codicons.css file must be included in the page:
<link rel="stylesheet" href="path/to/codicon.css" id="vscode-codicon-stylesheet">
Basic example
In icon-only mode, a label for screen readers can be defined using the label
attribute.
<vscode-toolbar-button icon="account" label="Account"></vscode-toolbar-button>
With caption
<vscode-toolbar-button icon="account">Account</vscode-toolbar-button>
Text-only
<vscode-toolbar-button>Account</vscode-toolbar-button>
Toggleable
<vscode-toolbar-button icon="account" label="Account" toggleable id="toggle-example"></vscode-toolbar-button>
const el = document.querySelector("#toggle-example");
el.addEventListener("change", () => { console.log("Checked:", el.checked); });