Skip to content

Textarea

Tag name: <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
Nameautocomplete
Attributeautocomplete
Type

'on' | 'off' | undefined

Default

undefined

autofocusreflects
Nameautofocus
Attributeautofocus
Type

boolean

Default

false

cols
Namecols
Attributecols
Type

number | undefined

Default

undefined

defaultValue
NamedefaultValue
Attributedefault-value
Type

string

Default

''

disabledreflects
Namedisabled
Attributedisabled
Type

boolean

Default

false

formreadonly
Nameform
Type

HTMLFormElement | null

invalidreflects
Nameinvalid
Attributeinvalid
Type

boolean

Default

false

label
Namelabel
Type

string

Default

''

maxLength
NamemaxLength
AttributemaxLength
Type

number | undefined

Default

undefined

maxlength
Namemaxlength
Type

number | undefined

Description

Lowercase alias to maxLength

minLength
NameminLength
AttributeminLength
Type

number | undefined

Default

undefined

minlength
Nameminlength
Type

number | undefined

Description

Lowercase alias to minLength

monospacereflects
Namemonospace
Attributemonospace
Type

boolean

Default

false

Description

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

name
Namename
Attributename
Type

string | undefined

Default

undefined

placeholder
Nameplaceholder
Attributeplaceholder
Type

string | undefined

Default

undefined

readonlyreflects
Namereadonly
Attributereadonly
Type

boolean

Default

false

requiredreflects
Namerequired
Attributerequired
Type

boolean

Default

false

resize
Nameresize
Attributeresize
Type

'both' | 'horizontal' | 'vertical' | 'none'

Default

'none'

rows
Namerows
Attributerows
Type

number | undefined

Default

undefined

spellcheck
Namespellcheck
Attributespellcheck
Type

boolean

Default

false

validationMessagereadonly
NamevalidationMessage
validityreadonly
Namevalidity
Type

ValidityState

value
Namevalue
Attributevalue
Type

string

versionreadonly
Nameversion
Type

string

Description

VSCode Elements version

willValidatereadonly
NamewillValidate
wrappedElementreadonly
NamewrappedElement
Type

HTMLTextAreaElement

Description

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

Methods

checkValidity() : boolean
NamecheckValidity
reportValidity() : boolean
NamereportValidity

Events

change
Namechange
TypeEvent
input
Nameinput
TypeInputEvent
vsc-changedeprecated
Namevsc-change
TypeCustomEvent
Description
vsc-inputdeprecated
Namevsc-input
TypeCustomEvent
Description

CSS Custom Properties

--vscode-editor-background
Name--vscode-editor-background
Default value#1f1f1f
--vscode-editor-font-family
Name--vscode-editor-font-family
Default valuemonospace
--vscode-editor-font-size
Name--vscode-editor-font-size
Default value14px
--vscode-editor-font-weight
Name--vscode-editor-font-weight
Default valuenormal
--vscode-editor-foreground
Name--vscode-editor-foreground
Default value#cccccc
--vscode-editor-inlineValuesForeground
Name--vscode-editor-inlineValuesForeground
Default valuergba(255, 255, 255, 0.5)
--vscode-focusBorder
Name--vscode-focusBorder
Default value#0078d4
--vscode-font-family
Name--vscode-font-family
Default valuesans-serif
--vscode-font-size
Name--vscode-font-size
Default value13px
--vscode-font-weight
Name--vscode-font-weight
Default valuenormal
--vscode-input-placeholderForeground
Name--vscode-input-placeholderForeground
Default value#989898
--vscode-scrollbar-shadow
Name--vscode-scrollbar-shadow
Default value#000000
--vscode-scrollbarSlider-activeBackground
Name--vscode-scrollbarSlider-activeBackground
Default valuergba(191, 191, 191, 0.4)
--vscode-scrollbarSlider-background
Name--vscode-scrollbarSlider-background
Default valuergba(121, 121, 121, 0.4)
--vscode-scrollbarSlider-hoverBackground
Name--vscode-scrollbarSlider-hoverBackground
Default valuergba(100, 100, 100, 0.7)
--vscode-settings-textInputBackground
Name--vscode-settings-textInputBackground
Default value#313131
--vscode-settings-textInputBorder
Name--vscode-settings-textInputBorder
Default valuetransparent
--vscode-settings-textInputForeground
Name--vscode-settings-textInputForeground
Default value#cccccc