Pathfinderby Commenda
Components

Text area

Multiline entry with auto-growth and soft character limits.

Shown in the transfer pricing report.

Installation

Import the component in your screen:

Example.tsx
import { TextArea } from '@commenda/pathfinder/text-area';

Load the stylesheet once in your app root, after host styles:

Example.tsx
import '@commenda/pathfinder/styles.css';

Pathfinder ships precompiled CSS; no Tailwind setup is required. In Next.js App Router, put interactive state and callbacks in a client component. See installation for the workspace setup.

API reference

PropTypeBehavior
resizeConfigObjectView fields · 3 shapesAuto 80–240px
characterLimitConfigConditionalObjectView fieldsSoft grapheme limit; excess text is preserved
maxLengthnumberNative UTF-16 hard limit; mutually exclusive with soft limit
actionConfigCopyActionView fieldsOptional copy action
labelConditionalstringVisible field label. Supply an accessible name when it is omitted.
hideLabelbooleanVisually hide the label while preserving its accessible name.
aria-labelConditionalstringAccessible name when the field has no visible label.
requiredConditionalbooleanMark the field as required. See validation guidance for the component.
labelConfigObjectView fields · 2 shapesChoose either optionalLabel or help, never both. never excludes the other field.
descriptionstringSupporting guidance associated with the field.
errorConfigObjectView fieldsValidation message and when it becomes visible.
disableConfigDisableConfigView fieldsDisabled state with an optional explanation.
valueConditionalstring—
onValueChangeConditional(value: string) => void—
defaultValuestring—
resizeConfigObject fields

Choose one of these 3 shapes. Do not combine fields excluded by the selected shape.

Option 1

FieldTypeRequirement
mode"auto"Required
minHeightnumberOptional
maxHeightnumberRequired

Option 2

FieldTypeRequirement
mode"manual"Required
minHeightnumberOptional
maxHeightnumberOptional

Option 3

FieldTypeRequirement
mode"fixed"Required
heightnumberRequired
characterLimitConfigObject fields
FieldTypeRequirement
maxnumberRequired
actionConfigObject fields
FieldTypeRequirement
kind"copy"Required
labelstringOptional
onCopyError((error: Error) => void)Optional
labelConfigObject fields

Choose one of these 2 shapes. Do not combine fields excluded by the selected shape.

Option 1

FieldTypeRequirement
optionalLabelstringRequired

Do not supply: help.

Option 2

FieldTypeRequirement
helpstringRequired

Do not supply: optionalLabel.

errorConfigObject fields
FieldTypeRequirement
messagestringRequired
reveal"after-blur" | "immediate"Optional
disableConfigObject fields
FieldTypeRequirement
isDisabledbooleanRequired
reasonstringOptional

Shared field props

PropTypeBehavior
labelstringVisible accessible label; hideLabel hides it visually.
aria-labelstringAccessible name when a visible label is not supplied.
valuestringControlled value; provide the corresponding change callback.
defaultValuestringInitial value for an uncontrolled control.
onValueChange(value: string) => voidImmediate editing changes; no implicit parsing.
descriptionstringVisible supporting guidance.
requiredbooleanNative required semantics and visual asterisk.
labelConfig{ optionalLabel } or { help }One annotation; cannot combine with required.
errorConfig{ message, reveal?: 'after-blur' | 'immediate' }Replaces guidance after blur by default.
disableConfig{ isDisabled, reason? }Disables editing; reason stays visible.
readOnlybooleanPreserves focus, selection, and form submission.

Native name, form, autocomplete, focus/blur handlers, constraints, IDs, ARIA attributes, and typed refs are supported. className styles the outer field. Use onValueChange for text changes. Form reset restores uncontrolled defaults; controlled values remain application-owned.

Usage rules

Minimum authored height is 80px with Copy 13 text. Auto mode grows until its maximum and then scrolls; manual mode resizes vertically. Soft counters count grapheme clusters including emoji and report excess immediately. Hard native limits use browser UTF-16 counting. A composer/send action belongs outside this component.

Limit

Keep the summary concise.0 / 100

Resize

States

This report is locked.
Describe the entity’s activities.

Design rules

Figma guidance and reviewed implementation decisions for this component. Rule IDs remain stable for source comments and AI references.

Source rules

RuleSourceContract
TEXTAREA-00184:363, 159:383Minimum 80px, Copy 13, grow to maximum then scroll.
TEXTAREA-002159:146, 159:324Soft limit permits excess and reports how much; counter opposite support.
TEXTAREA-003159:374Sending is composer behavior, not TextArea behavior.

All source IDs refer to The System.

Explicit implementation decisions

True native readOnly remains distinct from disabled despite Figma 158:822 using disabled appearance for non-editable fields. Disabled values do not submit; read-only values do. Disabled editing does not disable the independent copy/reveal actions. Clear cannot modify a disabled/read-only field.

The auto-grow maximum of 240px is a configurable implementation default, not an authored Figma measurement. Soft counters use Unicode graphemes; native maxLength uses browser UTF-16 counting. They are mutually exclusive to avoid contradictory limits.

Error reveal defaults to after-blur; immediate reveal supports submission/server errors. Soft-limit feedback is immediate. Applications own validation schemas and server error clearing. Additional required/help guidance belongs in description when the single label annotation is already occupied.

Optional-label text uses pearl 800 instead of the authored pearl 700: browser axe measured the latter at 3.38:1 on white, below the 4.5:1 requirement for this text.

On this page