Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Field examples · Text Areas

Textarea with Helper Text Above Field for React

A description textarea with a Markdown hint between the label and the textarea.

Framework
UI library

Say the format before people write. The FieldDescription between the Description label and the Textarea notes that Markdown is supported.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

Why is the Markdown note above the box?

FieldDescription sits between FieldLabel and Textarea. It reads Provide a detailed description. Markdown is supported.

How tall is the description box?

rows is 6. The label is Description, and FieldLabel names the textarea. Its htmlFor matches the control's id.

How does the placeholder show more than one line?

The placeholder starts with a heading, then a blank line, then Your description here. The source writes each of those breaks as a newline entity in the placeholder string.

Does this box format Markdown?

The description says Markdown is supported. The control is a Textarea with that sentence above it.

Is the label beside the box?

No. orientation is unset, so the field stays vertical. max-w-md caps the width.

How do I move the note under the box?

Put FieldDescription after the Textarea. The placeholder can stay as the sample of the heading layout.