TextArea

TextArea is a flexible multi-line input component for text. It supports color and size variants, ghost style, and integrates easily with forms and v-model. Use it for comments, messages, and other multi-line input scenarios.

Basic Usage

Code Example
Basic.vue

Components

The TextArea components include the following:

  • TextArea - A flexible multi-line input component for text.
  • ValidatorHint - A component for displaying validation messages or hints.

TextArea

The TextArea component provides a styled multi-line input for text, supporting color and size variants, ghost style, and easy v-model integration.

TextArea Props Type Description
modelValue
string
v-model The current textarea value.
placeholder
string

Placeholder text for the textarea.

type
'text' | 'phone' | 'email' | 'search'

Sets the textarea input type.
default: 'text'

ghost
boolean

Makes the textarea transparent until focused.

disabled
boolean

Disables the textarea.

color
string

Sets the color theme. Options: neutral, primary, secondary, accent, info, success, warning, error.

   
neutral
boolean

Shortcut for color='neutral'.

   
primary
boolean

Shortcut for color='primary'.

   
secondary
boolean

Shortcut for color='secondary'.

   
accent
boolean

Shortcut for color='accent'.

   
info
boolean

Shortcut for color='info'.

   
success
boolean

Shortcut for color='success'.

   
warning
boolean

Shortcut for color='warning'.

   
error
boolean

Shortcut for color='error'.

size
'xl' | 'lg' | 'md' | 'sm' | 'xs'

Sets the textarea size. Options: xl, lg, md, sm, xs.

   
xl
boolean

Shortcut for size='xl'.

   
lg
boolean

Shortcut for size='lg'.

   
md
boolean

Shortcut for size='md'.

   
sm
boolean

Shortcut for size='sm'.

   
xs
boolean

Shortcut for size='xs'.

validator
boolean

Adds the validator class for textarea validation styling.

TextArea Events Arguments Description
update:modelValue
v-model Emitted when the textarea value changes.

ValidatorHint

The ValidatorHint component provides a styled container for validation messages or hints, often used in conjunction with form validation.

ValidatorHint Slots Description
default

Displays the validation message or hint text.

Examples

Bordered

A textarea with a bordered style.

Code Example
Bordered.vue

Color

Textarea with different color variants.

Code Example
Color.vue

Disabled

A disabled textarea.

Code Example
Disabled.vue

Ghost

A textarea with ghost (transparent) style.

Code Example
Ghost.vue

With Form Control

Textarea used within a form control, showing label integration.

Code Example
WithFormControl.vue