Textarea

Provides ample space for detailed text, like drafting an email, allowing you to elaborate on thoughts and present comprehensive information easily.

If you are using Tailwind v4, please refer to the 2.x documentation. This documentation assumes you are using Tailwind v3.

Basic

A textarea is a larger box where you can type in text, like your name, email, or a longer message.

Installation

If you hit any issues, make sure you check out the installation guide here.

Composed Components

When you plug this component from the CLI, it autoloads all the composed components. No need to toss 'em in one at a time.

The Textarea's decked out with several components to make it bangin'.

Field

Field's a core piece every other component uses. It flexes reusable styles, showing up in inputs, labels, descriptions, and more.

Manual Installation

Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.

Anatomy

Import the components and use them as shown below, adapting the structure to fit each component.

Description

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

Please enter your address

Controlled

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

You have typed:

Uncontrolled

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

Validation

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

Readonly

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

Disabled

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