Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Textarea examples · Form

Textarea with Helper Text for React

A textarea with helper text under it that says where its content appears.

Framework
UI library

Tell people what their text is for before they write it. The Field puts a FieldLabel above the Textarea and a FieldDescription under it in the muted color, here to say that the bio appears on a public profile.

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

When should I add helper text to textarea fields?

When the label doesn't settle the question people will have: where the text appears, who reads it, what to include. Skip it for self-evident fields such as Message or Comment.

Should helper text go above or below the textarea?

Below, as here, for short context people can read after the field. Put it between the label and the field, as the Textarea with Description example does, when it's an instruction people need before they start typing.

Why use text-muted-foreground for helper text?

FieldDescription sets the muted color and a smaller size, so the helper reads as secondary to the label and the field. The token keeps enough contrast in both themes.

How long should helper text be?

One sentence, like the one here. Longer guidance belongs on a help page linked from the description.

Can helper text change based on user input?

Yes, it renders whatever you give it: a count, a hint that updates as people type. When the text describes an error, show a FieldError and mark the Field invalid instead, so the error is styled and announced as one.

How do I make helper text accessible for screen readers?

Give the FieldDescription an id and set the Textarea's aria-describedby to it, so screen readers read the helper when the field gets focus, after its label.