Skip to content
Ballpoint

Textarea

A multi-line field in a drawn box that grows with its text, optionally on ruled lines.

From shadcn/ui

Installation

pnpm dlx shadcn@latest add @ballpoint/textarea

Usage

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

<Textarea placeholder="Write something." />

Examples

Character count

A live count that turns red when the note runs over.

26 / 120

States

Invalid with a message, read-only and disabled.

Select and copy it, but it won't change.

With a button

A message field with its send button.

API reference

variant
default "box"
"box" | "lined"

A drawn box, or one with ruled lines to write on.

className
string

Styles the drawn box. Every other prop goes to the <textarea>.

seed
string | number

Pins the drawing.

Pen settings

The drawing also takes draw, roughness, passes, radius, corners, weight and speed, as props or from the nearest InkProvider. What each one does.