Button
<vscode-button>
Properties
- autofocus reflected
Attribute autofocus Type boolean
Default false
- disabled reflected
Attribute disabled Type boolean
Default false
- focused reflected
Attribute focused Type boolean
Default false
- form readonly
Type HTMLFormElement | null
- icon
A Codicon before the label
Attribute icon Type string
Default ''
- iconAfter
A Codicon after the label
Attribute icon-after Type string
Default ''
- iconAfterSpin reflected
Spin property for the after icon
Attribute icon-after-spin Type boolean
Default false
- iconAfterSpinDuration reflected
Duration property for the after icon
Attribute icon-after-spin-duration Type number | undefined
- iconSpin reflected
Spin property for the icon
Attribute icon-spin Type boolean
Default false
- iconSpinDuration reflected
Duration property for the icon
Attribute icon-spin-duration Type number | undefined
- name reflected
Attribute name Type string | undefined
Default undefined
- secondary reflected
Button has a less prominent style.
Attribute secondary Type boolean
Default false
- type reflected
Attribute type Type 'submit' | 'reset' | 'button'
Default 'button'
- value
Attribute value Type string
Default ''
- version readonly
VSC Element version
Events
- vsc-click deprecated
Please use the standard
click
event.Dispatched only when button is not in disabled state.
Type CustomEvent
Custom CSS Properties
- --vscode-button-border
Default var(--vscode-button-background)
--vscode-button-background
--vscode-button-foreground
--vscode-button-hoverBackground
--vscode-button-secondaryBackground
--vscode-button-secondaryForeground
--vscode-button-secondaryHoverBackground
--vscode-focusBorder
--vscode-font-family
--vscode-font-size
--vscode-font-weight