Skip to content

Textarea

ETextarea is a multi-line input field that is commonly used in forms to collect user input such as comments or reviews. Demo Here

Usage

vue

<template>
  <ETextarea v-model="value" label="Your message"/>
</template>

<script setup>
  const value = ref("");
</script>

Props

For ETextarea component, the following props are available:

PropTypeDefaultNote
labelnode-Component's label
idString-HTML id attribute.
typeString"text"Html type attribute.
rowsString"text"Html rows attribute.
resizeString"text"Html resize attribute.
disabledBooleanfalseDisables the ETextarea.
variantString"fill"The ETextarea element can be represented in four ways: fill and border.
messageString-Adds a message below the textarea.
squareBooleanfalseRemoves rounded corners of the element.
nameString-HTML name attribute.
validateOnString"input"Triggers validation on @values: submit, input, blur.
rulesArray-Validation rules. For more info refer to Form Validation.
stateString-Validates the user-provided data against established criteria and performs display validation. States can be none if no validation is necessary, danger if the selected is valid, or success if it is acceptable.
readOnlyBooleanfalseSame as readonly in native textarea makes the element not mutable.
requiredBooleanfalseIndicates that the user must specify a value for the textarea.
placeholderString-Defines a placeholder displayed in a form control when the control has no value.
colorString"primary"The given color is applied to the element - utility colors are supported (e.g primary or danger). you'll find a list of built-in classes on the src/styles/_vars.scsspage.
appendIconObject-Inserts a custom EIcon element to the textarea that is located after the textarea value. More Info here.
prependIconObject-Inserts a custom EIcon element to the textarea that is located before the textarea value. More Info here.
labelClassesBooleanfalseOverrides or extends the component's label styles.

Emits

The ETextarea component contains following emits.

EmitDescription
update:modelValueEmitted when the local ref's value is mutated.
inputIt binds to the component's input event.
changeIt binds to the component's onchange event.
blurIt binds to the component's onblur event.

COPYRIGHT