Skip to content

Input

EInput allows users to enter and amend text or numeric values on a single line. Demo Here

Usage

vue

<template>
  <EInput v-model="value" label="First Name"/>
</template>

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

Props

For EInput component, the following props are available:

PropTypeDefaultNote
labelString-Component's label
idString-HTML id attribute.
disabledBooleanfalseDisables the EInput.
typeString"text"Html input type attribute.
widthString-Sets the component's width.
variantString"fill"The EInput element can be represented in four ways: fill and border.
messageString-Adds a message below the input.
squareBooleanfalseRemoves rounded corners of the element.
nameString-HTML name attribute.
requiredBooleanfalseIndicates that the user must specify a value for the input.
readOnlyBooleanfalseSame as readonly in native input makes the element not mutable.
sizeString"md"The EInput element has three predefined sizes: sm, md, lg.
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.
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 input that is located after the input value. More Info here.
prependIconObject-Inserts a custom EIcon element to the input that is located before the input value. More Info here.

Emits

The EInput 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.
prependIconClickEmitted when the prepend icon is clicked.
appendIconClickEmitted when the append icon is clicked.
keydownIt binds to the component's keydown event.
pasteIt binds to the component's paste event.

COPYRIGHT