Getting StartedInstall and bootstrap headless foundations 4
LayoutHeadless structural primitives for expandable and container patterns 6
OverlayHeadless modal and floating layer behavior 3
FeedbackHeadless notification and status communication patterns 5
FormHeadless input and selection contracts 17
UtilityReusable action, identity, and clipboard behavior 6
NavigationHeadless trails, trees, menus, and command surfaces 7

API reference

[tngInputOtp] only reflects combined OTP state onto the host. You still own the slot inputs, their keyboard handling, and their visual layout.

tngInputOtp

Primitive attachment

html
<div
  tngInputOtp
  [length]="6"
  [value]="verificationCode()"
  [disabled]="isDisabled()"
  [readonly]="isReadonly()"
  [invalid]="hasError()"
  [focused]="isFocused()"
  [focusVisible]="showFocusRing()"
  [activeIndex]="activeIndex()"
></div>
InputTypeNotes
lengthnumberTotal slot count. The primitive normalizes it to a safe 1..12 range.
valuestringCombined OTP value used to derive empty, partial, and complete state hooks.
activeIndexnumber | nullReflects the currently active slot through data-active.
disabled, readonly, required, invalid, focused, focusVisiblebooleanMirrors your external interaction state into stable host attributes.

Reflected state

The primitive adds data-empty, data-partial, data-complete, data-disabled, data-readonly, data-required, data-invalid, data-focused, data-focus-visible, and data-active so your page CSS can react without custom DOM bookkeeping.

Ownership notes

  • The primitive does not render slot inputs for you.
  • You decide how characters are sanitized and how focus advances.
  • Reach for the component wrapper when you want that behavior prebuilt.