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
| Prop | Type | Default | Description |
|---|---|---|---|
label * | string | — | Textarea label text |
value | string | '' | Current textarea value |
placeholder | string | '' | Placeholder text |
rows | number | 4 | Number of visible rows |
error | string | — | Error message to display |
hint | string | — | Helper text shown on focus |
successMessage | string | — | Success message when valid |
required | boolean | false | Marks field as required |
disabled | boolean | false | Disables the textarea |
readonly | boolean | false | Makes textarea read-only |
maxLength | number | — | Maximum character length |
minLength | number | — | Minimum character length |
showCharCount | boolean | false | Shows character counter |
resize | 'none' | 'vertical' | 'horizontal' | 'both' | 'auto' | 'vertical' | Resize behavior |
size | 'sm' | 'md' | 'lg' | 'md' | Textarea size |
hideLabel | boolean | false | Hides label visually (keeps for accessibility) |
id | string | — | Unique identifier |
name | string | — | Form field name |
class | string | — | Additional CSS classes |
oninput | (event: Event) => void | — | Input handler |
onblur | (event: FocusEvent) => void | — | Blur handler |
onfocus | (event: FocusEvent) => void | — | Focus handler |
validateOnMount | boolean | false | Show validation state immediately without waiting for interaction |
Healthcare Best Practices
- • Always use
showCharCountfor 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
requiredand provide clearhinttext for documentation standards - • Use
readonlyfor 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
minLengthto enforce minimum documentation requirements