Browse docsTextarea

ControlsNew

Glass Textarea

A recessed glass text area that can grow with its text.

Preview

Grows as you type, up to five rows.

Demos ready. Update 0.

Installation

For React 19+ apps with Tailwind CSS 4.

npx shadcn@4.14.1 add @glassyui/glass-textarea

Adds 6 files to components/glassyui and installs clsx.

Usage

Usage

import { GlassTextarea } from "@/components/glassyui/glass-textarea";

export function MessageDemo() {
  return <GlassTextarea autoResize label="Message" hint="Grows as you type." placeholder="Say hello…" />;
}

Examples

Limit the growth

<GlassTextarea autoResize maxRows={5} label="Notes" />
Fixed height with a resize handle

<GlassTextarea rows={6} label="Bio" />

API reference

GlassTextarea

A textarea in a wrapper with its label and hint. className and ref go to the textarea.

PropTypeDefaultDescription
labelstringNoneVisible label above the field, linked with htmlFor.
hintstringNoneHelper text below the field, linked with aria-describedby.
rowsnumber3Starting height in rows. Without autoResize the field has a vertical resize handle.
autoResizebooleanfalseGrows with its text, refitting when the width changes, then scrolls past maxRows.
maxRowsnumber8The most rows an auto-resizing field grows to.

Also accepts HTML textarea attributes.

Types
GlassTextareaProps
Accessibility
Without a label, name the field with aria-label.