ui

Textarea

A native textarea element. Built with Base UI and Tailwind CSS. Copy-paste ready.

Installation

Usage

Examples

Sizes

Renders the sm, default, and lg size variants to show how the textarea scales across layout contexts.

Disabled

Prevents all interaction while keeping the current content visible in the field.

With Label

Associates a Label with the textarea using htmlFor for accessible labelling without a Field wrapper.

With Description

Adds a short description paragraph below the textarea to provide usage guidance or character constraints.

With Character Count

Displays a live character counter below the textarea that updates as the user types, useful for fields with a maximum length.

Form Integration

Wraps the textarea in Form and Field for required validation and a visible FieldError displayed on submit.

Word Count

Displays live word and character counts below the textarea as the user types, useful for length-aware fields like bios or summaries.

Write / Preview

A two-tab toggle that switches between an editable textarea and a read-only preview panel, mimicking a markdown editor's split view.

Support Ticket

A support form with pill-style category chips (Bug Report, Feature Request, etc.) and a message textarea. Submitting shows an inline confirmation state without navigating away.

Chat Composer

An inline chat thread with a growing message textarea and action buttons for attachment, emoji, and send. Pressing Enter sends the message and appends a new bubble to the thread.

Release Notes Editor

A release notes form with a version title input, a character-capped markdown textarea, and Save Draft / Publish actions. The header badge reflects the current publish status.