Skip to main content

Textarea

Textarea components are used for collecting large amounts of textual data.

info

For more details about Vuetify’s usage of Textarea component, click Textarea page.
For more prop explanations, click Vuetify Textarea API page.

Props

NameDescriptionTypeDefault
appendIconAppends an icon to the component, uses the same syntax as Icon.stringundefined
autoGrowAutomatically grow the textarea depending on amount of text.booleanfalse
autoFocusEnables autofocus.string'$Clear'
classProp that determines the class to add to the Textarea.stringundefined
clearIconApplied when using clearable and the input is dirty.booleanfalse
clearableAdd input clear functionality, default icon is Material Design Icons mdi-clear.booleanfalse
counterCreates counter for input length; if no number is specified, it defaults to 25. Does not apply any validation.boolean|Number|stringundefined .
compareValueQLegend is used for comparison values. You can look at the QLegend document.stringundefined
compareTextQLegend is used for comparison values. You can look at the QLegend document.stringundefined
compareTableValueQLegend is used for comparison values. You can look at the QLegend document.stringundefined
counterValuefunctionnull-
darkApplies the dark theme variant to the component. This will default the components color to white unless you’ve configured your application theme to dark or if you are using the color prop on the component. You can find more information on the Material Design documentation for dark themes.booleanfalse
disabledDisable the input.booleanfalse
errorPuts the input in a manual error state.booleanfalse
errorCountThe total number of errors that should display at once.number|string1
errorMessagesPuts the input in an error state and passes through custom error messages. Will be combined with any validations that occur from the rules prop. This field will not trigger validation.string|array[]
hideDetailsHides hint and validation errors. When set to auto messages will be rendered only if there’s a message (hint, error message, counter value etc) to display.boolean|stringundefined
hintHint text.stringundefined
labelSets input label.stringundefined
formatIt is used to format the entered values. You can find more detailed information here.stringundefined
loadingDisplays linear progress bar. Can either be a string which specifies which color is applied to the progress bar (any material color or theme color - primary, secondary, success, info, warning, error) or a boolean which uses the component color (set by color prop - if it’s supported by the component) or the primary color.boolean|stringfalse
noResizeRemove resize handle.booleanfalse
persistentHintForces hint to always be visible.booleanfalse
placeholderSets the input’s placeholder text.stringundefined
prefixDisplays prefix text.stringundefined
prependInnerIconPrepends an icon to the component, uses the same syntax as Icon.stringundefined
preventPastePrevents copy-pasting of data.booleanfalse
readonlyPuts input in readonly state.booleanfalse
rowsDefault row countNumber|string5
rulesAccepts a mixed array of types function, boolean and string. Functions pass an input value as an argument and must return either true / false or a string containing an error message. The input field will enter an error state if a function returns (or any value in the array contains) false or is a string.Array[]
soloChanges the style of the input.booleanfalse
soloInvertedReduces element opacity until focused.booleanfalse
successPuts the input in a manual success state.booleanfalse
successMessagesPuts the input in a success state and passes through custom success messages.string|Array[]
suffixSets input type.string'Text'
tabindexAllows component to give and receive focus.numberundefined
validateOnBlurDelays validation until blur even.booleanfalse t
valueThe input’s value.anyundefined
visibleVisibility of TextArea component.booleantrue

Events

NameDescriptionType
blurEmitted when the input is blurred.event
changeEmitted when the input is changed by user interactionany
clickEmitted when input is clickedMouseevent
click:appendEmitted when appended icon is clickedevent
click:append-outerEmitted when appended outer icon is clickedevent
click:clearEmitted when clearable icon clickedevent
click:prependEmitted when prepended icon is clickedevent
click:prepend-innerEmitted when prepended inner icon is clickedevent
focusEmitted when component is focusedevent
inputThe updated bound modelAny
keydownEmitted when any key is pressedKeyboardEvent
mousedownEmitted when click is pressedMouseEvent
mouseupEmitted when click is releasedMouseEvent
update:errorThe error.sync event.boolean
TextareaQuickInputFormat

Number Format Usage

The following format options can be used to format the ‘number’ values. However, if groupseperator and radixpoint are set with the use as default option in the settings of the application, these values you set will be invalid.

  • Drag and Drop Textarea component

  • Set format prop 'number'

  • Set formatValues prop with needed format options

    Example Setting FormatValues

    {'alias'='decimal','groupSeparator'='.','radixPoint'=',','digits'=2,'enforceDigitsOnBlur'=true}

image

number_VTextarea

Number Format Options

OptionsValuesDescriptionType
aliasnumeric, currency, decimal, integer, percentageThe defaults are those defined in the base numeric alias. The currency alias and others are derived from the numeric alias and can have other defaults.string
digitsThe value can be a number, *, or a quantifier syntax like 2,4 When the quantifier syntax is used, the digitsOptional option is ignorednumber
digitsOptionaltrue,falseSpecify wheter the digits are optional. Default: trueboolean
enforceDigitsOnBlurtrue,falseEnforces the decimal part when leaving the input field. Default: falseboolean
radixPointDigit sembols .default: "."string
groupSeparatorthousand seperator sembols. default: ""string
allowMinustrue,falseAllow to enter -.Default: trueboolean
prefixDefine a prefix.Default: ""string
suffixDefine a suffix.Default: ""string
minMinimum value.Default: undefinednumber
maxMaximum value.Default: undefinednumber
shortcutsDefine shortcuts. This will allow typing 1k => 1000, 2m => 2000000. To disable just pass null Default: {k: "000", m: "000000"}{k: number, m: number }
rightAligndefault: trueAlign the input to the rightboolean

Quick Number Format Options

OptionsValuesDescriptionType
quicktrue,falseTo use the quickInputFormat library, which was developed due to formatting and performance problems in the inputmask library.boolean
aliasnumeric, currency, decimal, integer, percentageThe defaults are those defined in the base numeric alias. The currency alias and others are derived from the numeric alias and can have other defaults.string
digitsThe value can be a number, *, or a quantifier syntax like 2,4 When the quantifier syntax is used, the digitsOptional option is ignorednumber
digitsOptionaltrue,falseSpecify wheter the digits are optional. Default: trueboolean
enforceDigitsOnBlurtrue,falseEnforces the decimal part when leaving the input field. Default: falseboolean
radixPointDigit sembols .default: "."string
groupSeparatorthousand seperator sembols. default: ""string
allowMinustrue,falseAllow to enter -.Default: trueboolean
minMinimum value.Default: undefinednumber
maxMaximum value.Default: undefinednumber
rightAligndefault: trueAlign the input to the rightboolean

BigDecimal Format Usage

The following format options can be used to format the ‘bigdecimal’ values. However, if groupseperator and radixpoint are set with the use as default option in the settings of the application, these values you set will be invalid.

BigDecimal Format Options

OptionsValuesDescriptionType
digitsfractional digits countnumber
radixPointDigit sembols .default: "."string
groupSeparatorthousand seperator sembols. default: ""string
integerDigitsinteger digits countnumber

BigDecimal Format Usage

  • Drag and Drop TextField component

  • Set format prop 'bigdecimal'

  • Set formatValues prop with needed format options

    Example Setting FormatValues

    {'groupSeparator'='.','radixPoint'=',','digits'=2,'integerDigits'=16}

Regex Format Usage

  • Drag and Drop Textarea component.
  • Set format prop 'regex'.
  • Set formatValues prop with regex value.

Alert: "\" character must be used before "{". Ex: [0-9]{2}[A-Z]{24} must be [0-9]\{2}[A-Z]\{24}

Example Setting FortmatValues

{'regex' = '[0-9]\{2}[A-Z]\{24}'}
{regex = '[0-9]\{1,15}(,[0-9]\{1,15})*'}

Formatted Component Value

To get input value from the component, use the getUnmaskedValue method

let compValue = components.{{compQID}}.getUnmaskedValue()

Samples Qjson

Textarea_format_regex_sample