Skip to content

Textarea

Form

Multi-line text input with native resizing support.

Multi-line inputDisabled
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Use for longer, multi-line content. Set rows to establish the initial height; the component supports native vertical resizing.

Import
import { Textarea } from "@dashboardpack/core/components/ui/textarea";

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Textarea props
PropType / DefaultDescription
rowsnumber

Default: 2 (browser)

Initial visible line count.
value / defaultValuestring

Default: —

Controlled or initial text.
onChangeChangeEventHandler<HTMLTextAreaElement>

Default: —

Handle text changes.
disabledboolean

Default: false

Disable editing.

Build with these too