Skip to Content
ComponentsTextarea

Textarea

A multi-line text input with optional auto-resize behavior using the CSS field-sizing: content property.

Import

import { Textarea } from "chunks-ui";

Basic Usage

<Textarea placeholder="Write your message..." />

Auto-Resize

When autoResize is true, the textarea grows vertically to fit its content using the native CSS field-sizing: content property:

<Textarea autoResize placeholder="Start typing..." />

The textarea has a min-h-20 minimum height by default.

With Field

<Field.Root> <Field.Label>Bio</Field.Label> <Field.Description>Write a short bio (max 280 characters)</Field.Description> <Textarea autoResize placeholder="Tell us about yourself..." maxLength={280} /> </Field.Root>

Write a short bio (max 280 characters)

Disabled

<Textarea disabled placeholder="This field is disabled" />

Props

PropTypeDefaultDescription
autoResizebooleanfalseEnable auto-resize via field-sizing: content
classNamestringAdditional CSS classes

All standard <textarea> props are supported (value, onChange, placeholder, disabled, rows, maxLength, etc.).

Last updated on