Skip to main content
Version: 1.0

InputOTP

Used to Input and Enter OTP

import { InputOTP } from "@neneys/ui"

InputOTP(...)

Parameters​

ParamValue
initialValuestring
onChangedDoAction
onSubmittedDoAction
childrenInputOTPChildClass[]

InputOTPChild

Children under InputOTP

Class Methode​

InputOTPChild.character​

ParamValue
allowDigitboolean
allowLowercaseAlphabetboolean
allowUppercaseAlphabetboolean
obscuredboolean
onlyUppercaseAlphabetboolean
onlyLowercaseAlphabetboolean
readOnlyboolean

Example​

import { InputOTPChild } from "@neneys/ui"

InputOTPChild.character({ allowDigit: true })

InputOTPChild.space()​

It omits a space between others in InputOTP < >

InputOTPChild.separator()​

Gives a - separater

Example​

import { InputOTP, InputOTPChild } from "@neneys/ui"

InputOTP('#idInput', {
children: [
InputOTPChild.character({ allowDigit: true }),
InputOTPChild.character({ allowDigit: true }),
InputOTPChild.character({ allowDigit: true }),
InputOTPChild.space(),
InputOTPChild.character({ allowDigit: true }),
InputOTPChild.character({ allowDigit: true }),
InputOTPChild.character({ allowDigit: true }),
InputOTPChild.separator()
InputOTPChild.character({ allowDigit: true }),
]
})