Textarea

A multi-line text field for longer input, styled to match Input.

View Source

#Installation

npx @dinachi/cli@latest add textarea

#Usage

tsx
import { Textarea } from '@/components/ui/textarea'

Reach for it when the answer is a sentence rather than a value. Anything shorter than that is an Input, which sits on one line and does not invite the reader to write more than they need to.

#Examples

#Accessibility

#API Reference

Renders a native <textarea>. Every attribute it accepts is forwarded, including rows, maxLength, readOnly and disabled.

PropTypeDefaultDescription
rowsnumberbrowser defaultVisible height in lines. The field also carries a min-height of 80px, so a smaller value will not shrink it below that
placeholderstringPlaceholder text displayed when the textarea is empty
maxLengthnumberMaximum number of characters accepted
readOnlybooleanfalseWhether the value can be selected and copied but not edited
disabledbooleanfalseWhether the textarea is disabled