Textarea

Interactive documentation for the textarea component. Change props in the playground, inspect states, and copy the generated example.

Preview

Code

<Textarea
  v-model="value"
  placeholder="Placeholder"
  class="w-[320px]"
/>

States

Dedicated examples for default, filled, disabled, error, required, and autoresize states.

Default

Filled

Disabled empty

Disabled filled

Error empty

Error message

Error message

Error filled

Error message

Error message

Required

Autoresize

Props

This table matches the current TextareaProps interface.

PropTypeDefaultRequiredDescription
modelValuestring''RequiredCurrent textarea value. Used with v-model binding.
rowsnumberl: 3, xl: 4OptionalControls the minimum visible rows. If not provided, default value depends on size.
placeholderstringundefinedOptionalFloating label text displayed above the textarea when focused or filled.
disabledbooleanfalseOptionalDisables the textarea and applies disabled visual styles.
classstring'w-full'OptionalCustom class applied to the root wrapper. Useful for controlling width.
errorstringundefinedOptionalError message displayed below the textarea. Also switches border and outline to error state.
size'l' | 'xl''l'OptionalControls text size, label size, border radius, default rows, and line height.
maxRowsnumber12OptionalMaximum row count used for autoresize height calculation.
autoresizebooleanfalseOptionalAutomatically adjusts textarea height based on content until maxRows is reached.
requiredbooleanfalseOptionalShows a required asterisk next to the floating label.