Pathfinderby Commenda
Components

Input

Single-line text with labels, validation, unit segments, and actions.

Use the legal name on the certificate of incorporation.

Installation

Import the component in your screen:

Example.tsx
import { Input } from '@commenda/pathfinder/input';

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
typeConditional"password"|"number"|"search"|"text"|"email"|"url"|"tel"text
leadingIconReactElement<any, string | React.JSXElementConstructor<any>>Decorative 16px slot
prefixstringNon-editable unit segments
suffixstringNon-editable unit segments
actionConfigObjectView fields · 3 shapesReveal is password-only; copy supports onCopyError, reveal supports hideLabel
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—
actionConfigObject fields

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

Option 1

FieldTypeRequirement
kind"copy"Required
labelstringOptional
onCopyError((error: Error) => void)Optional

Option 2

FieldTypeRequirement
kind"clear"Required
labelstringOptional

Option 3

FieldTypeRequirement
kind"reveal"Required
labelstringOptional
hideLabelstringOptional
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

Use noun labels in sentence case, examples as placeholders, and actionable error messages. One authored 28px size with radius 6. Copy remains available when editing is disabled. Clear never mutates disabled/read-only input. Password reveal changes visibility without changing the value. Numeric input retains native string editing; currency formatting is not included.

Segments

$
USD

Actions

States

(optional)
Enter the registered legal name.
Managed by your administrator.

Design rules

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

Source rules

RuleSourceContract
INPUT-00168:225, 158:22228px field, radius 6, pearl control border, blue focus glow.
INPUT-002158:318, 158:819One label annotation; units use prefix/suffix, actions use their own segment.
INPUT-003158:807, 158:816Sentence-case noun label; actionable error replaces guidance after blur.
INPUT-004158:482Copy remains available for disabled values.

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.

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