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.
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
Installation
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.
Related
- Textarea with DescriptionA textarea with a description between its
- Textarea with HintA textarea with an Optional hint at the
- Textarea with ErrorAn invalid textarea with a destructive
- Input with Helper TextAn email field with helper text under it
- Textarea with Description FieldA feedback textarea with a description
- Required TextareaA required textarea with a red asterisk