Component

Textarea input

<DomTextareaInput>

A multi-line field with shared form state and optional content-driven growth, including an optional maximum row limit.

Playground

Try every prop live

Textarea playground

Use rows as the starting height, enable autosize for content-driven growth, and set maxRows when the field should eventually scroll.

A short public summary.

Playground.vuevue
Install
npm install @getdom/studio
vue
<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomTextareaInput } from '@getdom/studio';

const data = reactive({
	  "modelValue": "",
	  "id": "",
	  "name": "",
	  "label": "Bio",
	  "description": "A short public summary.",
	  "placeholder": "Tell us about yourself…",
	  "required": false,
	  "disabled": false,
	  "readOnly": false,
	  "invalid": false,
	  "errors": [],
	  "visible": true,
	  "validators": [],
	  "validateOnBlur": true,
	  "chrome": "field",
	  "rows": 2,
	  "autosize": true,
	  "maxRows": 6
	});
</script>

<template>
	<DomTextareaInput
		v-bind="data"
		@update:modelValue="data.modelValue = $event"
	/>
</template>

Demo

Unlimited and bounded growth

The same autosize API supports continuous expansion or a fixed maximum before internal scrolling begins.

rows sets the minimum; omitting maxRows leaves growth uncapped.

The textarea scrolls after reaching maxRows.

Install
npm install @getdom/studio
vue
<script setup>
import '@getdom/studio/style.css';
import { ref } from 'vue';
import { DomTextareaInput } from '@getdom/studio';

const unlimited = ref('This field keeps growing.\nAdd more lines to see it expand without a ceiling.');
const bounded = ref('This field grows to five rows.\nAfter that, its content scrolls inside the textarea.');
</script>

<template>
	<div class="grid w-full gap-5 md:grid-cols-2">
		<DomTextareaInput
			v-model="unlimited"
			label="Unlimited growth"
			description="rows sets the minimum; omitting maxRows leaves growth uncapped."
			autosize
			:rows="1"
		/>
		<DomTextareaInput
			v-model="bounded"
			label="Bounded growth"
			description="The textarea scrolls after reaching maxRows."
			autosize
			:rows="1"
			:max-rows="5"
		/>
	</div>
</template>

Reference

Props

Control props

NameTypeTSDefaultDescription
rowsnumbernumber3Minimum visible rows, or the fixed row count when autosize is disabled.
autosizebooleanbooleanfalseGrow and shrink the textarea to match its content.
maxRowsnumbernumber0Maximum autosized rows before vertical scrolling begins. Use 0 for no maximum.

Field props

NameTypeTSDefaultDescription
modelValueanyany''Current field value.
idstringstring''Optional ID override. By default parent forms derive the input ID from the field path using underscores.
namestringstring''Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
labelstringstring''Visible field label.
descriptionstringstring''Optional helper copy below the field.
placeholderstringstring''Placeholder shown when the control is empty.
requiredbooleanbooleanfalseMark the field as required.
disabledbooleanbooleanfalseDisable field interaction.
readOnlybooleanbooleanfalseShow the value but prevent editing.
invalidbooleanbooleanfalseMark the field invalid.
errors
ts
[
	{
		name: "Validation name",
		message: "Error message",
	}
]
array | object | stringArray<ErrorsItem
type ErrorsItem = {
	name?: string; // Name
	message?: string; // Message
};
>
[]Validation errors for this field.
visiblebooleanbooleantrueShow or hide the field.
validatorsarrayArray<unknown>[]Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
validateOnBlurbooleanbooleantrueRun validators when the field loses focus.
chrome'field' | 'none' | falsestring'field'Render default field chrome, or hide chrome while keeping form state wiring.

Auto-generated from Textarea input.props and inline _edit hints.

Events

NamePayloadDescription
@update:modelValuestringFired when the text changes.
@focusFocusEventFired when the textarea receives focus.
@blurFocusEventFired when the textarea loses focus.

Names auto-detected from defineEmits and source emit() calls; payload and description from __doc.events when present.