Labeled field with reserved-height hint ↔ error swap. Validates on blur / debounce. Interior inline-validation contract on CIDS Input.
Anatomy
Label ┌──────────────────────────── ✓/! ┐ │ value │ ← Input + status icon └─────────────────────────────────┘ hint ⟷ error ← same grid cell, fixed height
Props
| Prop | Type | Default | Notes | |
|---|---|---|---|---|
label | string | — | Visible label (htmlFor). | |
value / onChange | controlled | — | Field owns no text. | |
validate | (v: string) => string | null` | — | Message or null if ok. |
hint | string | — | Resting help; crossfades with error. | |
debounce | number | 400 | ms before invalid message updates. | |
type | input types | "text" | Native type. | |
required / disabled | boolean | false | — | |
className | string | — | cn-merged. |
Motion
- · Opacity 150ms on hint/error/icons. No
motion. Clearing invalid is immediate (no debounce).
A11y
- · Label linked;
aria-invalid+aria-describedbyfor hint/error - · Error announced via polite live region
- · Hit area follows Input md (36px)