Skip to content

Glow textarea

Multiline textarea with a floating label that springs on focus and a cursor-mapped pastel border glow. Same light system as glow-input — resizable, with spring physics on every interaction.

  • Spring Physics
  • requestAnimationFrame
  • pastelColour

glow-textarea

Focus any field. Move your cursor.

Usage

Drop it in

import
import { GlowTextarea } from "@/app/lib/components/glow-textarea";
example 1
<GlowTextarea label="Bio" rows={4} value={bio} onChange={setBio} />
<GlowTextarea label="Notes" disabled rows={3} />

API

Props

PropTypeDefault
label

Floating label text that springs above the textarea on focus or when a value is present

string"Label"
value

Controlled textarea value

string""
onChange

Change handler called on every keystroke

(value: string) => void—
placeholder

Placeholder shown once the label has floated and the field is focused

string""
error

Error message — locks glow to soft coral pastel and renders message below the textarea

string—
disabled

Disables the textarea and suppresses all glow and spring motion

booleanfalse
rows

Number of visible text rows

number4
className

Additional class names applied to the outermost wrapper div

string""

Read from the component's source at build time. * required.

Accessibility

Works with

Cursor
Reacts to where the pointer is, not just whether it's over the element.
Touch
Follows your finger while it's down, then settles a moment after you lift.
Keyboard
Focus lights it up the way the cursor does. Every action has a key.
Reduced motion
Nothing moves or springs. Colour still answers, without drifting.