Skip to main content

CaInputTextarea

Text field, use v-model to bind value

SASS-path: ./styles/components/atoms/ca-input-textarea.scss

Props

NameDescriptionTypeRequiredDefault
labelThe label of the field, showed as "placeholder" when field empty or not in focusStringfalse-
placeholderThe field placeholder, can be used if not using labelStringfalse-
valueThe value of the field, use v-model to bind dataString / Numbertrue-
descriptionA description text for the fieldStringfalse-
requiredIs the field requierd?Booleanfalsetrue
disabledIs the field disabled?Booleanfalsefalse
idId of field, also used as nameStringfalse-
validUsed to handle validation outside input scopeBooleanfalsetrue
errorMessageWhat error text should be displayed if field not vaildStringfalsenull

Events

Event NameDescriptionParameters
inputInput has been madeField value (String/Number)
validationValidation has been madeIs valid (Boolean)

Methods

MethodDescriptionParameters
validateInputValidate input, sets fieldValid and returns bool-
validateIfErrorValidates field instantly if not valid, used on keyup-
blurHandlerControls what happens on field blur-

Computed

ComputedTypeDescriptionFrom Store
modifiersObjectAll the modifier classesNo
allValidBooleanIs field valid?No
inputListenersObjectUsed to be a transparent wrapper for the text input, all events will be passed throughNo