Textarea

A multi-line text input that can grow with its content.

Base UI InputSource

Basic

Use this for text longer than one line, such as a message. Put Textarea in Field.Root, like Field.Control. The user can drag it taller.

Drag the bottom corner to make the box taller.

Grow with the content

Set autoExpand to grow the box as the user types, up to 320px. Then it scrolls.

This box grows as you type.

Sizes

Match the size of the fields and buttons beside it. sm, md, and lg set the text size and padding to match fields of the same size.

sm · dense UI
md · default
lg · hero field

States

Use inset by default and line for light or inline editing, with one appearance per form. Hover and focus the fields to see those states.

inset · forms
Write at least 10 characters.
line · inline editing
Write at least 10 characters.

Usage

These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.

  • autoExpand grows the box with its content up to a maximum height. Browsers without field-sizing support keep a fixed height and scroll.

API

Props that the library adds. Every part also takes all the Base UI props.

Textarea

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Sets the text size, padding, and control height.
appearance'inset' | 'line''inset'Sets the field shape. Use line for light or inline editing, such as renaming in place, filters, and quick settings.
autoExpandbooleanfalseGrows the box with its content, up to 320px. The user cannot resize it.
rowsnumber3The number of visible lines. An autoExpand box ignores it.