Skip to content
ghostui

Preview

Design guidance

Use Textarea for instructions, feedback, and longer form answers. Use Composer for a chat message with attachments or sending controls. Give the field a visible label. Keep instructions and validation in Field or the application.

Four rows set the default initial and minimum height. Set rows for shorter or longer tasks. An explicit style.minHeight can override the minimum. The native corner grip resizes vertically. Its border mark doubles along both edges on hover and extends across the bottom during a drag; the right mark keeps its hover length. Motion follows the system’s reduced-motion preference. Set style={{ resize: "none" }} for a fixed field. The control fills its container; use the container width, native cols, or style to choose line length.

Installation

Install

Install Field when using the labeled and validated examples below. Textarea itself remains a native control.

Basic usage

Structures

Textarea renders one native textarea. Use Field.Control render={<Textarea />} when the field needs Field registration and validation. Native attributes, events, and the ref reach that same element.

Examples

Outline

Use the default outline when the field needs a clear boundary.

Ghost

Blend editable text into the page without inner padding. The text aligns with its label. The surface and boundary stay transparent; hover and focus clarify only the text and placeholder.

Short feedback

Set rows={2} for a brief answer.

Long content

Set rows={8} for a research brief. The value stays caller-owned.

Fixed size

Use native style={{ resize: "none" }} when the surrounding layout must keep its height.

Invalid

Associate the field with a useful error message. required still uses native validation.

Add a reason before requesting a review.

Read only

Keep a policy selectable and readable while preventing edits.

Disabled

Show an unavailable field with its current content.

API reference