Skip to content
Pixelbits
Docs / Textarea
Forms

Textarea

A multi-line text field with the same frame as Input. Works inside a Field like every kit control.

Grows as you type.

Installation

npm: import
import { Textarea } from "pixelbits/textarea";
shadcn: copy the source
npx shadcn add https://pixelbits.ali-moradi-develop.com/r/textarea.json

API

<Textarea>

A multi-line text field with the same frame as Input. Works inside a Field like every kit control.

Example
<Field label="Message">
  <Textarea autoResize rows={3} placeholder="Tell us about the project…" />
</Field>
PropTypeDefaultDescription
autoResizebooleanfalse

Grow with the content (CSS field-sizing: content, no JavaScript), between rows and maxRows.

maxRowsnumber12

With autoResize, the height stops growing at this many rows and scrolls.

Also accepts every prop of TextareaHTMLAttributes<HTMLTextAreaElement>.