InputOTP
One-time password / code entry with slot composition.
InputOTP — a one-time code in boxes (input-otp), the twin of genesis-ui-native's NativeInputOTP. `pattern` is tested against the whole code, on both: pass genesis-core's `OTP_PATTERN_DIGITS` (input-otp's `REGEXP_ONLY_DIGITS`) for digits. A pasted code loses the spaces, dashes and dots it is often grouped with ("123-456"), as on the phone, unless `pasteTransformer` says otherwise.
packages/ui/src/components/ui/input-otp.tsx
@marktiderman/genesis-uiimport { InputOTP } from "@marktiderman/genesis-ui";@marktiderman/genesis-ui.- InputOTP
- InputOTPGroup
- InputOTPSlot
- InputOTPSeparator
react-docgen-typescript.InputOTP
InputOTP — a one-time code in boxes (input-otp), the twin of genesis-ui-native's NativeInputOTP. `pattern` is tested against the whole code, on both: pass genesis-core's `OTP_PATTERN_DIGITS` (input-otp's `REGEXP_ONLY_DIGITS`) for digits. A pasted code loses the spaces, dashes and dots it is often grouped with ("123-456"), as on the phone, unless `pasteTransformer` says otherwise.
| Prop | Type | Default | Description |
|---|---|---|---|
| maxLength* | number | — | |
| containerClassName | string | — | |
| nonce | string | — | |
| noScriptCSSFallback | string | null | — | |
| onChange | ((newValue: string) => unknown) | — | |
| onComplete | ((...args: any[]) => unknown) | — | |
| pasteTransformer | ((pasted: string) => string) | — | |
| pushPasswordManagerStrategy | enum | — | |
| render | InputOTPRenderFn | — | |
| textAlign | enum | — | |
| value | string | — |
InputOTPGroup
No declared props.
InputOTPSlot
| Prop | Type | Default | Description |
|---|---|---|---|
| index* | number | — |
InputOTPSeparator
No declared props.