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
Attribute autocomplete Type 'on' | 'off' | undefined
Default undefined
- autofocus reflected
Attribute autofocus Type boolean
Default false
- cols
Attribute cols Type number | undefined
Default undefined
- defaultValue
Attribute default-value Type string
Default ''
- disabled reflected
Attribute disabled Type boolean
Default false
- form readonly
Type HTMLFormElement | null
- invalid reflected
Attribute invalid Type boolean
Default false
- label
Type string
Default ''
- maxLength
Attribute maxLength Type number | undefined
Default undefined
- maxlength
Lowercase alias to maxLength
Type number | undefined
- minLength
Attribute minLength Type number | undefined
Default undefined
- minlength
Lowercase alias to minLength
Type number | undefined
- monospace reflected
Use monospace fonts. The font family, weight, size, and color will be the same as set in the VSCode code editor.
Attribute monospace Type boolean
Default false
- name
Attribute name Type string | undefined
Default undefined
- placeholder
Attribute placeholder Type string | undefined
Default undefined
- readonly reflected
Attribute readonly Type boolean
Default false
- required reflected
Attribute required Type boolean
Default false
- resize
Attribute resize Type 'both' | 'horizontal' | 'vertical' | 'none'
Default 'none'
- rows
Attribute rows Type number | undefined
Default undefined
- spellcheck
Attribute spellcheck Type boolean
Default false
- validity readonly
Type ValidityState
- value
Attribute value Type string
- version readonly
VSC Element version
- wrappedElement readonly
Getter for the inner textarea element if it needs to be accessed for some reason.
Type HTMLTextAreaElement
validationMessage readonly
willValidate readonly
Methods
- checkValidity
Return boolean
- reportValidity
Return boolean
Events
- change
Type Event
- input
Type InputEvent
- vsc-change deprecated
Type CustomEvent
- vsc-input deprecated
Type CustomEvent
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