Textarea

<vscode-textarea>

Multi-line text input.

When participating in a form, it supports the :invalid pseudo class. Otherwise the error styles can be applied through the invalid property.

Properties

autocomplete
Attributeautocomplete
Type'on' | 'off' | undefined
Defaultundefined
autofocus reflected
Attributeautofocus
Typeboolean
Defaultfalse
cols
Attributecols
Typenumber | undefined
Defaultundefined
defaultValue
Attributedefault-value
Typestring
Default''
disabled reflected
Attributedisabled
Typeboolean
Defaultfalse
form readonly
TypeHTMLFormElement | null
invalid reflected
Attributeinvalid
Typeboolean
Defaultfalse
label
Typestring
Default''
maxLength
AttributemaxLength
Typenumber | undefined
Defaultundefined
maxlength

Lowercase alias to maxLength

Typenumber | undefined
minLength
AttributeminLength
Typenumber | undefined
Defaultundefined
minlength

Lowercase alias to minLength

Typenumber | undefined
monospace reflected

Use monospace fonts. The font family, weight, size, and color will be the same as set in the VSCode code editor.

Attributemonospace
Typeboolean
Defaultfalse
name
Attributename
Typestring | undefined
Defaultundefined
placeholder
Attributeplaceholder
Typestring | undefined
Defaultundefined
readonly reflected
Attributereadonly
Typeboolean
Defaultfalse
required reflected
Attributerequired
Typeboolean
Defaultfalse
resize
Attributeresize
Type'both' | 'horizontal' | 'vertical' | 'none'
Default'none'
rows
Attributerows
Typenumber | undefined
Defaultundefined
spellcheck
Attributespellcheck
Typeboolean
Defaultfalse

validationMessage readonly

validity readonly
TypeValidityState
value
Attributevalue
Typestring
version readonly

VSC Element version

willValidate readonly

wrappedElement readonly

Getter for the inner textarea element if it needs to be accessed for some reason.

TypeHTMLTextAreaElement

Methods

checkValidity
Returnboolean
reportValidity
Returnboolean

Events

change
TypeEvent
input
TypeInputEvent
vsc-change deprecated
TypeCustomEvent
vsc-input deprecated
TypeCustomEvent

Custom CSS Properties

--vscode-editor-background

--vscode-editor-font-family

--vscode-editor-font-size

--vscode-editor-font-weight

--vscode-editor-foreground

--vscode-editor-inlineValuesForeground

--vscode-focusBorder

--vscode-font-family

--vscode-font-size

--vscode-font-weight

--vscode-input-placeholderForeground

--vscode-scrollbar-shadow

--vscode-scrollbarSlider-activeBackground

--vscode-scrollbarSlider-background

--vscode-scrollbarSlider-hoverBackground

--vscode-settings-textInputBackground

--vscode-settings-textInputBorder

--vscode-settings-textInputForeground