VTextArea
Props
Name | Type | Description |
---|---|---|
success-text | string | The success text for the form element. |
helper-text | string | The helper text for the form element. |
char-count | boolean | Whether to show the character count. |
error-text | string | The error text for the form element. |
label | string | The label for the form element. |
aria-current | Enum:page step location date time true false | Indicates the element that represents the current item within a container or set of related elements. |
disabled | boolean | Sets the element's disabled state. A disabled element will not be included during form submission. |
initial-value | string | The initial value of the form. This value sets the value property only when the value property has not been explicitly set. |
value | string | The current value of the element. This property serves as a mechanism to set the value property through both property assignment and the .setAttribute() method. This is useful for setting the field's value in UI libraries that bind data through the .setAttribute() API and don't support IDL attribute binding. |
required | boolean | Require the field to be completed prior to form submission. |
read-only | boolean | When true, the control will be immutable by user interaction. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly |
resize | Enum:none both horizontal vertical | The resize mode of the element. |
autofocus | boolean | Indicates that this element should get focus after the page finishes loading. |
form | string | The https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id |
list | string | Allows associating a https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist |
maxlength | number | The maximum number of characters a user can enter. |
minlength | number | The minimum number of characters a user can enter. |
name | string | The name of the element. |
placeholder | string | Sets the placeholder value of the element, generally used to provide a hint to the user. |
cols | number | Sizes the element horizontally by a number of character columns. |
rows | number | Sizes the element vertically by a number of character rows. |
spellcheck | boolean | Sets if the element is eligible for spell checking but the UA. |
wrap | Enum:hard soft off | The wrap attribute |
Events
Name | Event Type | Description |
---|---|---|
click | MouseEvent | Fires when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element. |
focus | FocusEvent | Fires when the element receives focus. |
blur | FocusEvent | Fires when the element loses focus. |
keydown | KeyboardEvent | Fires when a key is pressed. |
keyup | KeyboardEvent | Fires when a key is released. |
input | Event | Fires when the value of an element has been changed. |
change | CustomEvent<undefined> | Emits a custom 'change' event when the textarea emits a change event |
Slots
Name | Description |
---|---|
helper-text | Describes how to use the text-area. Alternative to the helper-text attribute. |
Methods
Name | Type | Description |
---|---|---|
select | () => unknown | Selects all the text in the text area |
validate | () => void | {@inheritDoc (FormAssociated:interface).validate} |