Skip to content
shadcn.io
shadcn.io is not affiliated with official shadcn/ui

Shadcn Textarea for React and Tailwind

Form textarea or textarea-styled component.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/textarea.json

Usage

import { Textarea } from "@/components/ui/textarea";
<Textarea />

Controlled

Control the value with value and onChange.

States

Disabled

Disable the textarea with the disabled prop. Use Field with disabled to disable the whole field (label + textarea).

Invalid

Use the invalid prop on Field or Textarea to show invalid state.

Examples

Autoresize

Use autoresize to make the textarea grow with content.

With Field

Wrap the textarea in a Field and add FieldLabel and FieldDescription.

With Input Group

Use FieldGroup to group multiple Field blocks. Combine textarea with other inputs and action buttons.

Form Integration

API Reference

Textarea

Multi-line text input. Accepts all native textarea attributes.

PropTypeDefault
autoresizebooleantrue
classNamestring-

For a complete list of props, see the Ark UI documentation.