Button

<vscode-button>

Properties

autofocus reflected
Attributeautofocus
Typeboolean
Defaultfalse
disabled reflected
Attributedisabled
Typeboolean
Defaultfalse
focused reflected
Attributefocused
Typeboolean
Defaultfalse
form readonly
TypeHTMLFormElement | null
icon

A Codicon before the label

Attributeicon
Typestring
Default''
iconAfter

A Codicon after the label

Attributeicon-after
Typestring
Default''
iconAfterSpin reflected

Spin property for the after icon

Attributeicon-after-spin
Typeboolean
Defaultfalse
iconAfterSpinDuration reflected

Duration property for the after icon

Attributeicon-after-spin-duration
Typenumber | undefined
iconSpin reflected

Spin property for the icon

Attributeicon-spin
Typeboolean
Defaultfalse
iconSpinDuration reflected

Duration property for the icon

Attributeicon-spin-duration
Typenumber | undefined
name reflected
Attributename
Typestring | undefined
Defaultundefined
secondary reflected

Button has a less prominent style.

Attributesecondary
Typeboolean
Defaultfalse
type reflected
Attributetype
Type'submit' | 'reset' | 'button'
Default'button'
value
Attributevalue
Typestring
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.

TypeCustomEvent

Custom CSS Properties

--vscode-button-background

--vscode-button-border
Defaultvar(--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