Textarea

Textarea is a form element for entering multiple lines of text. Used for comments, descriptions, messages, and other long-form input.

2
Variants
2
Sizes
4
Resize
Field
Field

Playground

Preview
defaultstandard
Variant
Size
Radius
Resize
Rows
State
Field
Focus
<Textarea placeholder="Type your message..." />

Variants

Default
Standard border — for general form inputs
General forms
Filled
Filled background — for high-emphasis inputs
In-card forms

Sizes

Textarea height is controlled by the rows attribute. The size property only adjusts padding and font size.

compact
Padding8px 12px
Font14px
standard
Padding12px 16px
Font16px

Features

Resize

None
none

No resize — for fixed-height layouts

Vertical
vertical

Vertical only — the most common option

Horizontal
horizontal

Horizontal only — for special cases

Both
both

Both directions — when full flexibility is needed

States

DefaultNormal

0/500

ErrorError
DisabledDisabled

Focus States

focusRing: false (default): Border change only on click, focus ring auto-shown on keyboard Tab. focusRing: true: Always show focus ring.

API

Props

variant"default"
"default" | "filled"

Textarea visual style

size"default"
"compact" | "default"

Padding and font size (compact: for tight spaces)

radius"default"
"none" | "sm" | "base" | "default" | "lg" | "xl" | "2xl" | "3xl" | "full"

Border radius size (6px)

resize"vertical"
"none" | "vertical" | "horizontal" | "both"

Resize direction

rows4
number

Number of visible rows

focusRingfalse
boolean

Show custom focus ring. Keyboard-only focus ring shown even when false

errorundefined
boolean

Error state (red border)

disabledundefined
boolean

Disabled state

placeholderundefined
string

Placeholder text

Field

errorfalse
boolean

Error state. Auto-propagates to Field.Error and Textarea

disabledfalse
boolean

Disabled state. Auto-propagates to Field.Label and Textarea

gap"default"
"none" | "xs" | "sm" | "default" | "lg"

Gap between child elements (0 / 4 / 6 / 8 / 12px)

Field.Label

requiredfalse
boolean

Show required mark (*) at end of label

Anatomy

1
2
Comment
3
Share your thoughts or feedback.
The more detail you provide,
the faster we can respond.
4
52 / 200
1
Field
Field wrapper
2
Label
Label
3
Textarea Area
Text input area
4
Char Count
Character count (optional)

Best Practices

Do

  • Set initial height with appropriate rows attribute
  • Show counter when character limit exists
  • Set resize="none" when resize is not needed
  • Show input examples in placeholder

Don't

  • Don't use Textarea for short text (use Input)
  • Don't set extremely small rows
  • Don't truncate without disclosing character limits upfront
  • Don't use without a label

Accessibility

Keyboard

TabMove focus
EnterNew line
EscRemove focus

WCAG 2.2 Compliance

  • Focus indicator
  • aria-invalid (on error)
  • aria-describedby support
  • Contrast ratio 4.5:1 or higher