Skip to content
Theme:

Ui3nText ​

Textarea component for multi-line text input with validation support.

Props

NameTypeDefaultDescription
idstring | undefined —

Root element id

namestring | undefined —

HTML name attribute for form submission

modelValue*string —

Text value

rowsnumber | undefined6

Number of rows

maxRowsnumber | undefined6

Maximum number of rows

labelstring | undefined""

Text label

placeholderstring | undefined""

Text placeholder

rules((v: string) => string | boolean)[] | undefined —

Validation rules

validateAtStartupboolean | undefinedfalse

Whether to validate at startup

disabledboolean | undefinedfalse

Whether text is disabled

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: string —
entervalue: { value: string; altKey: boolean; ctrlKey: boolean; shiftKey: boolean; metaKey: boolean; } —
initvalue: HTMLTextAreaElement —
focusvalue: Event —
blurvalue: Event —
changevalue: string —
inputvalue: string —
keydownvalue: KeyboardEvent —
escapevalue: Event —
update:validvalue: boolean —

Public Methods & Exposes

Method NameSignature / TypeDescription
clear()() => void —

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-text-border-radius4px
--ui3n-text-font-size13px
--ui3n-text-label-font-size12px
--ui3n-text-padding-block8px
--ui3n-text-padding-inline8px

Usage Examples ​

Simple text area ​

Simple text area

Basic textarea with v-model

Text area with label ​

Text area with label

Textarea with label and placeholder

Text area with validation ​

Text area with validation

Textarea with validation rules