Textarea

Multi-line field that can grow with its content and count characters against maxLength.

Source
1 file
Dependencies
none
Playground
yes

Examples

Every variant of the shipped component, live. Switch the layout to read them as a table or one at a time, and open Code for the file behind them.

01Basic
02Variant
03Size
04Auto-resize
05Counter
0/120
06States

Bio must be at least 20 characters.

Installation

One package for the whole library — run this once and every component on this site is importable. Adding the tokens to your stylesheet is the other half; the installation guide covers it.

npm install kipui
import { Textarea } from "kipui";
Peer dependencies

react 19

react-dom 19

tailwindcss 4

Bundled dependencies

None beyond the peers above.

Usage

textarea-example.tsx
import { Textarea } from "kipui";

<Textarea
  resize="auto"
  maxRows={8}
  maxLength={280}
  showCount
  placeholder="Say something"
/>
  • `showCount` needs `maxLength` — without it there is nothing to count against.
  • `resize="auto"` grows the field up to `maxRows`, then scrolls.

Playground

Change the props and the snippet underneath updates with them.

Preview

<Textarea />

Props

5
<Textarea variant="default" size="md" resize="vertical" />

API reference

Transcribed from the component's own types. Props with no default are required.

PropDefaultDescription
variant"default" | "filled" | "ghost""default"Surface treatment of the field.
size"sm" | "md" | "lg""md"Padding and type scale.
resize"none" | "vertical" | "auto""vertical"`auto` grows with content up to `maxRows`.
maxRowsnumberrequiredCeiling for `resize="auto"`, in rows.
showCountbooleanfalseCharacter counter. Requires `maxLength`.
invalidbooleanfalseError styling and `aria-invalid`.