Pittaya UI
Pittaya UI
Links

Search Components

Search for components by name, description, category or tags

Formsstable

Textarea

A flexible textarea field with sensible defaults. Use for multi-line text entry. Includes examples showing minimal and expanding behaviors.

Profile Settings
Update your public profile information.

You can @mention other users and organizations.

Installation

Install the component directly into your project using the Pittaya CLI.

npx pittaya@latest add textarea

When to use

Use Textarea when you need a multi-line text field such as comments, descriptions, messages or any long-form text input.

For compact forms, consider the minimal variant. For a smoother UX on small screens, use an expanding textarea that reveals more space on focus.

Best practices

  • Provide helpful placeholder text to guide input.
  • Use a visible label to improve accessibility and clarity.
  • For very long content, allow scrolling inside the textarea.
  • Consider an expanding interaction for mobile to conserve space.

Accessibility

Ensure textareas are associated with labels via label elements and provide clear focus styles for keyboard users.

Examples

Combine variants and sizes to meet your needs.

Basic

Standard textarea for multi-line text input.

Profile Settings
Update your public profile information.

You can @mention other users and organizations.

Minimal

A minimal, modern look that blends with subtle backgrounds.

Quick Note
Saved

Auto-saves as you type

Expanding (smooth)

Demonstrates a smooth expanding interaction on focus — minimal JS kept inside the preview for portability.

Comment

Scrollable

Use a taller textarea with scroll when content is long.

License Agreement
Please review the terms before continuing.

Properties

TSX interface that combines variants and default attributes.

PropTypeDefaultDescription
placeholder
stringHelper text displayed when the field is empty.
rows
numberSets the visible number of text lines (browser native).
disabled
booleanfalseDisables interaction with the textarea.
className
stringAdditional CSS classes to customize the textarea.