{
  "purpose": "Enter a short verification code through one labelled native input while showing visual character slots.",
  "avoid": "Grouping must not obstruct paste or assistive technology.",
  "classification": "source-bound-reference-with-explicit-decisions",
  "basis": "Pinned React/primitive sources lead API, lifecycle and semantics; native visual observations and explicit reference decisions are mapped in figma/traceability.json.",
  "profile": "interactive-control/1",
  "profileRationale": "The family presents controls or navigation; static depictions do not establish an interactive contract.",
  "componentId": "shadcn:InputOtp",
  "sourceRule": "InputOTP forwards input-otp1.4.2 OTPInputProps, maxLength:number is required, value/defaultValue are strings, onChange(newValue:string) is not a native event callback. onComplete receives the complete value when a previously observed shorter value becomes exactly maxLength; initial full value is not an automatic completion request. It does not submit, verify, store or resend codes. The underlying library defaults inputMode=numeric and autoComplete=one-time-code, but only a supplied pattern enforces characters. This reference explicitly selects maxLength6 and REGEXP_ONLY_DIGITS, complete six slots indexed0..5, and a pasteTransformer removing spaces/hyphens. Pattern failure rejects the whole candidate rather than sanitizing arbitrary letters. Underlying selection, paste insertion, length truncation and fake caret use one actual input; slots/groups are visual divs. The reference explicitly hides visual slots and the separator from assistive technology while the real input remains labelled/exposed. Wrapper spellCheck=false can be overridden by native props. Disabled suppresses native user editing; controlled props remain authoritative and caller owns verification errors, cooldown and server response. The input-otp implementation also forwards native defaultValue alongside its internal value when supplied; React19 can warn about both. This reference deliberately uses the controlled string form.",
  "keyboardAndFocus": "The actual native input provides arrows, selection, Backspace/Delete, paste and one-time-code autofill. Tab enters one input, not six fake controls. Do not invent per-slot roving focus or automatic submission. Enter is ordinary native form behavior; onComplete only reports a filled code. Escape does not clear the code. Error text is explicit aria-describedby/aria-invalid; never identify codes only by color.",
  "contentAlternative": "Full code text/native input value/labelled slide text remains available without icon, fake caret, motion or hover. Caller owns exact help/error/recovery wording.",
  "updatesAndDescendants": "InputOTP forwards input-otp1.4.2 OTPInputProps, maxLength:number is required, value/defaultValue are strings, onChange(newValue:string) is not a native event callback. onComplete receives the complete value when a previously observed shorter value becomes exactly maxLength; initial full value is not an automatic completion request. It does not submit, verify, store or resend codes. The underlying library defaults inputMode=numeric and autoComplete=one-time-code, but only a supplied pattern enforces characters. This reference explicitly selects maxLength6 and REGEXP_ONLY_DIGITS, complete six slots indexed0..5, and a pasteTransformer removing spaces/hyphens. Pattern failure rejects the whole candidate rather than sanitizing arbitrary letters. Underlying selection, paste insertion, length truncation and fake caret use one actual input; slots/groups are visual divs. The reference explicitly hides visual slots and the separator from assistive technology while the real input remains labelled/exposed. Wrapper spellCheck=false can be overridden by native props. Disabled suppresses native user editing; controlled props remain authoritative and caller owns verification errors, cooldown and server response. The input-otp implementation also forwards native defaultValue alongside its internal value when supplied; React19 can warn about both. This reference deliberately uses the controlled string form. The actual native input provides arrows, selection, Backspace/Delete, paste and one-time-code autofill. Tab enters one input, not six fake controls. Do not invent per-slot roving focus or automatic submission. Enter is ordinary native form behavior; onComplete only reports a filled code. Escape does not clear the code. Error text is explicit aria-describedby/aria-invalid; never identify codes only by color.",
  "sourceCommit": "45bbf9ba23c9c0f63d38887947e5fb06f59c7da3",
  "sourceFiles": [
    "sources/shadcn/apps/v4/registry/bases/base/ui/input-otp.tsx.source",
    "sources/shadcn/apps/v4/content/docs/components/base/input-otp.mdx.source",
    "sources/shadcn/apps/v4/registry/bases/base/examples/input-otp-example.tsx.source"
  ],
  "sourcePackages": [
    "input-otp@1.4.2"
  ],
  "referenceDecision": "Concrete content, labels, OTP digit policy, carousel positional/live text and clipboard fallback instructions are explicit caller composition; source-specific limitations are retained.",
  "visualContract": {
    "layoutPolicy": "The native connected six-slot specimen supplies 36px square slots,10px external group corners,1px joined borders and 8px group gaps; separator 24px makes the three-plus-three composition 256px wide. Value text is a single real input-otp input, with decorative groups aria-hidden and redundant separator hidden. The source library owns its input overlay, selection/paste/caret logic; CSS keeps transparent native input above the visual slots without replacing it with six inputs. LTR code order is an explicit reference choice inside RTL hosts. Digit-only pattern, maxLength 6, pasteTransformer stripping spaces/hyphens, one-time-code completion and help/error wording are caller choices. Target sets documented pushPasswordManagerStrategy=none to avoid width expansion for this fixed six-slot recipe; no claim about external password manager support. The source optional caret uses a static visible line in this no-motion reference, rather than inventing focus state or animation from Figma. Disabled opacity and real native disabled/cursor behavior remain source-specific. Readable error text accompanies invalid slot borders; native label/help/error relationships remain on the one input.",
    "parts": "component.json#/partBindings",
    "tokenBindings": "component.json#/visualContract/tokens",
    "sourceEvidence": "figma/traceability.json"
  }
}
