Textarea

Displays a form textarea or a component that looks like a textarea. Uses text-start so typed text aligns with writing direction. For a single-line control, see Input.

Basic

A multi-line text field with native textarea behavior.

Installation

CLI
npx @sonojs/ui@latest add textarea

Composition

structure
Textarea

Usage

textarea.tsx
import { Textarea } from "@/components/ui/textarea"

export function Example() {
  return <Textarea placeholder="Type your message here." />
}

Props

PropTypeDefaultDescription
placeholderstring—Hint text shown when empty.
disabledbooleanfalseDisable the control.
aria-invalidboolean—Marks the field invalid and applies error styles.
…textarea propsReact.ComponentProps<"textarea">—Native attributes pass through to the element.