Skip to content

Forms

ITextarea ​

A multi-line field, with the same sizes and states as IInput.

The model is a string, and rows sets the starting height when you are not using autosize.

Autosize ​

autosize grows the field with its content instead of scrolling it.

Pass an object to bound the growth. min and max are counted in rows.

Character count ​

showCount adds a count under the field. With maxlength it reads against the limit and turns red in the last tenth. Screen readers only hear it then, so they aren't told the count on every keystroke.

The announcement is English by default. Pass countLabel to translate it:

vue
<ITextarea v-model="bio" show-count :maxlength="160" :count-label="n => `quedan ${n}`" />

Sizes ​

States ​

Inside an IFormField, invalid is set for you from the validation state.

Props ​

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Control scale
rowsnumber—Starting height, when not autosizing
autosizeboolean | { min?, max? }falseGrow with the content, optionally bounded in rows
placeholderstring—Placeholder text
disabledbooleanfalseDisables the field
requiredbooleanfalseMarks it required
invalidboolean—Error styling; set automatically inside IFormField
maxlengthnumber—Hard character limit
showCountbooleanfalseShow a character count under the field
countLabel(remaining: number) => stringEnglishWhat screen readers announce near the limit
idstringgeneratedUseful when an external ILabel targets it
unstyledboolean—Drop built-in classes
classstring—Merged with the built-in classes; lands on the wrapper when showCount is on

For a single line use IInput; for a number, INumberInput.