GitHub

Input OTP

One-time password input with separate digit fields

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { InputOTP } from "@corew500/ui/input-otp"

<InputOTP>Content</InputOTP>

CMS Integration

CMSPayload CMS Integration
This component supports CMS-driven content via @corew500/cms-payload.
Loading...

API Reference

Props

PropTypeDefaultDescription
valuestring——
onChange(newValue: string) => unknown——
maxLength*number——
textAlignenum——
onComplete(...args: any[]) => unknown——
pushPasswordManagerStrategyenum——
pasteTransformer(pasted: string) => string——
containerClassNamestring—Additional class name for the container element
noScriptCSSFallbackstring——
renderInputOTPRenderFn——

Accessibility

Keyboard Navigation

  • Supports standard input keyboard navigation

Focus Management

  • Slots are visual representation with focus indicator

Additional

  • - Single hidden input manages actual value and form submission
  • Paste support for full code entry
  • Disabled state reduces opacity and prevents interaction

Localization

Translatable Content

  • - Component is purely numeric/alphanumeric, no text content
  • Surrounding labels should be translated by consuming application