Forms

Textarea

A multi-line text input component for longer content like clinical notes, patient histories, and referral notes. Supports auto-resize, character counting, and comprehensive validation.

Basic Usage

Standard textareas for capturing detailed clinical information and patient notes.

With Character Count

Use character counting for fields with length limits to help users stay within documentation requirements.

Auto-Resize

Auto-resizing textareas grow with content, perfect for dynamic note-taking during patient encounters.

Validation States

Show validation feedback to ensure complete and accurate clinical documentation. Use validateOnMount to show validation state immediately.

Sizes

Choose appropriate sizes based on form density and the importance of the documentation field.

Disabled & Read-only

Use disabled for unavailable fields and read-only for archived or locked documentation.

Resize Options

Control how users can resize textareas based on your UI requirements.

Props

PropTypeDefaultDescription
label *stringTextarea label text
value string''Current textarea value
placeholder string''Placeholder text
rows number4Number of visible rows
error stringError message to display
hint stringHelper text shown on focus
successMessage stringSuccess message when valid
required booleanfalseMarks field as required
disabled booleanfalseDisables the textarea
readonly booleanfalseMakes textarea read-only
maxLength numberMaximum character length
minLength numberMinimum character length
showCharCount booleanfalseShows character counter
resize 'none' | 'vertical' | 'horizontal' | 'both' | 'auto''vertical'Resize behavior
size 'sm' | 'md' | 'lg''md'Textarea size
hideLabel booleanfalseHides label visually (keeps for accessibility)
id stringUnique identifier
name stringForm field name
class stringAdditional CSS classes
oninput (event: Event) => voidInput handler
onblur (event: FocusEvent) => voidBlur handler
onfocus (event: FocusEvent) => voidFocus handler
validateOnMount booleanfalseShow validation state immediately without waiting for interaction

Healthcare Best Practices

  • • Always use showCharCount for fields with length limits to help clinicians stay within documentation requirements
  • • Use resize="auto" for note-taking during patient encounters to reduce scrolling
  • • Mark required fields with required and provide clear hint text for documentation standards
  • • Use readonly for finalized notes to prevent accidental edits to archived documentation
  • • Validate clinical notes for completeness before submission to ensure compliance with documentation standards
  • • Provide meaningful error messages that guide clinicians on what information is missing or incorrect
  • • Consider using minLength to enforce minimum documentation requirements