Forms

Textarea

A multi-line text input field for entering longer content, such as comments, descriptions, or messages. It provides a resizable input area with validation.

Loading...

Installation

Install the component via the CLI in one command.

npx shadcn@latest add @intentui/textarea

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

Manual installation

Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.

npm install react-aria-components tailwind-merge

Anatomy

import { Textarea } from "@/components/ui/textarea"

<Textarea
  label="Address"
  description="Please enter your address"
/>

Examples

Description

You can add a description to the textarea by using the description prop.

Loading...

Controlled

You can control the textarea value by using the value prop.

Loading...

Uncontrolled

You can control the textarea value by using the defaultValue prop.

Loading...

Validation

Try submitting the form without filling it out to see the error state in action.

Loading...

Readonly

When the textarea is set to readonly, it cannot be edited.

Loading...

Disabled

When the textarea is disabled, it becomes non-editable and appears inactive.

Loading...

Component API

Textarea

The Textarea component renders a multi-line text input.

PropTypeDefault
classNamestring-

See the React Aria for the full API reference.

Unlock the full power of
Intent UI Design

Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.

Learn more