Skip to main content

@microsoft/fast-foundation > TextArea

TextArea class

A Text Area Custom HTML Element. Based largely on the <textarea> element.

  • The default slot for the label

label - The label

root - The element wrapping the control

control - The textarea element

change - Emits a custom 'change' event when the textarea emits a change event

Signature:
export declare class TextArea extends FormAssociatedTextArea 

Properties

PropertyModifiersTypeDescription
autofocusbooleanIndicates that this element should get focus after the page finishes loading.
colsnumberSizes the element horizontally by a number of character columns.
formIdstringThe id of the form the element is associated to
liststringAllows associating a datalist to the element by https://developer.mozilla.org/en-US/docs/Web/API/Element/id.
maxlengthnumberThe maximum number of characters a user can enter.
minlengthnumberThe minimum number of characters a user can enter.
namestringThe name of the element.
placeholderstringSets the placeholder value of the element, generally used to provide a hint to the user.
readOnlybooleanWhen true, the control will be immutable by user interaction. See readonly HTML attribute for more information.
resizeTextAreaResizeThe resize mode of the element.
rowsnumberSizes the element vertically by a number of character rows.
spellcheckbooleanSets if the element is eligible for spell checking but the UA.

Methods

MethodModifiersDescription
select()Selects all the text in the text area