byDefaultHuman
Components

Textarea

A hand-drawn textarea with optional auto-grow and resize support.

Installation

package manager
npx shadcn add https://bydefaulthuman.fun/r/textarea.json

Props

PropTypeDefaultDescription
autoGrow
boolean
false
Controls the `autoGrow` behavior.
error
string
Error message shown below the component.
label
string
Optional label text shown with the component.
theme
CrumbleTheme
Overrides the global Crumble theme for this instance.
value
string
Controlled textarea value.
defaultValue
string
Initial uncontrolled value.
placeholder
string
Placeholder text.
rows
number
Visible row count when auto-grow is off.
disabled
boolean
Disables the textarea.
onChange
(event) => void
Change handler.

Auto-grow

The textarea expands as you type. The SVG border tracks the height via ResizeObserver.

Error state

Message is required

Disabled

Accessibility

Textarea renders a native textarea element and keeps the label in the DOM for assistive technologies. When using autoGrow, the resizing is visual only and does not change keyboard behavior.

Examples

import { Textarea } from "@/components/crumble/ui/textarea";

<Textarea label="Message" placeholder="Write something..." />;