A multi-line text field that grows with its content.
$ pnpm dlx shadcn@latest add https://dashral.com/r/textarea.jsonInstallation
$ pnpm dlx shadcn@latest add https://dashral.com/r/textarea.jsonAdds the component, the components it builds on, its npm packages and the theme tokens it uses. Using Dashral often? Add the registry to components.json once:
{
"registries": {
"@dashral": "https://dashral.com/r/{name}.json"
}
}Then add components by name:
$ pnpm dlx shadcn@latest add @dashral/textareaUsage
import { Textarea } from "@/components/dashral/textarea"
<Textarea label="Notes" placeholder="Anything we should know?" />Examples
API reference
Textarea
Also takes every prop of <textarea>(opens in a new tab).
| Prop | Type | Default |
|---|---|---|
label | ReactNodeShown above, linked to the control. | — |
description | ReactNodeA hint under the control. | — |
error | boolean | ReactNodetrue shows the error style; a message also shows under the control. | — |
labelAction | ReactNodeAt the end of the label's row, e.g. a “Forgot password?” link or the current value. | — |
withAsterisk | booleanMarks the label with an asterisk, e.g. alongside required. | false |
classNames | { root, label, description, error, textarea }Classes for each part. | — |
className | stringExtra classes, merged with cn() so yours win. | — |
Accessibility
- With label, description or error, the id, aria-describedby and aria-invalid are wired up for you.
- It grows with its content (field-sizing) where browsers support it.