Controls

Textarea

Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Textarea

Textarea

A multi-line field that grows with its text and counts down to its limit.

Installation

npx shadcn@latest add ikislay/pixel-ui/textarea

How to use

import { Textarea } from "@/components/ui/textarea"
export function Demo() {
return <Textarea placeholder="Leave a note" aria-label="Note" maxLength={140} />
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
maxLength
number

The character limit. Setting it shows the countdown ring.

invalid
boolean

Marks the field invalid with a red ring and aria-invalid.

rows
number

Sets the starting height. The field still grows past it as you type.

onFeedback
(event: "error") => void

Called at each semantic moment, for wiring sound or haptics.

className
string

Merged onto the wrapper. Other props go to the textarea.