Skip to content
Aback UI

Textarea

A multi-line text control for longer input.

StableUsed in Aback Tools, Aback LaunchRegistry JSON (opens in a new tab)

Shown on the changelog after you publish.

Installation

Copy the source with the CLI to own and edit it, or import it from the npm package.

npx aback-ui@latest add textarea

Writes components/ui/textarea.tsx. First time in this project? Run npx aback-ui@latest init first, as the installation guide shows.

Usage

Import the parts you need from the installed file. The Code tab above has a complete, working example.

tsx
import { Textarea, textareaClassName } from "@/components/ui/textarea";

API reference

Props and composition points for Textarea. Native element props pass through.

PropTypeDefaultDescription
rowsnumberNoneInitial visible height. The control still resizes vertically.
aria-invalidboolean | "true" | "false"NoneTurns the border destructive and pairs with a Field error.
disabledbooleanNonePrevents interaction and reduces opacity.
classNamestringNoneWidth and minimum height adjustments.

Dependencies: no extra packages, plus the shared @/lib/utils helper.

Accessibility

Semantics, keyboard behavior, and the decisions that keep the component operable.

  • Pair with a visible Label or Field, and associate descriptions and errors with aria-describedby.
  • The control resizes vertically only, so horizontal layout is never broken.
  • Use font-mono only when the content is code or data, not for ordinary prose.
  • Set a sensible maxLength and show a remaining character count when the limit matters.

Used in production

The Aback products whose interfaces shaped this component.