Textarea
Components

Textarea

Multi-line text field using the same Control shell as Input, but resizable.

Props

TextareaProps props
PropTypeDefaultDescription
valuestring—Controlled value.
onChangeChangeEventHandler<HTMLTextAreaElement>—Change handler.
rowsnumber—Number of visible text rows.
placeholderstring—Placeholder text when empty.
noResizeboolean—Disables manual resizing (default allows vertical).
monoboolean—Monospace font.
invalidboolean—Invalid styling. Defaults to the enclosing Field error state.
disabledboolean—Prevents interaction.
readOnlyboolean—Non-editable but focusable.
containerClassNamestring—Targets the shell; className targets the <textarea>.

Usage

Textarea shares the same Control shell as Input, so border, background, focus ring, and disabled treatment are visually identical. The textarea itself is vertically resizable by default; use noResize to lock it.

Basic

Textarea

With rows

Textarea with rows

No resize

Textarea noResize

Mono

Textarea mono
ImportTSX
import { Textarea } from "@solarius/onset";
import type { TextareaProps } from "@solarius/onset";

<Textarea placeholder="Write your message..." />
<Textarea rows={8} noResize />
<Textarea mono defaultValue="code here" />