Interface for a class OtpInput
Event triggers when the Otp input is focused out.
EmitType<Event>
Event triggers after the creation of the Otp Input.
Event triggers when the Otp input is focused.
Event triggers each time when the value of each Otp input is changed.
Event triggers after the value is changed and the Otp input is focused out.
string[]
Defines the ARIA-label attribute for each input field in the Otp (One-Time Password) input component. Each string in the array corresponds to the ARIA-label attribute for each input field.
<template>
<ejs-otpinput id='otpInput' :ariaLabels="ariaLabels"></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {
data() {
return {
ariaLabels: ['otp-input-1', 'otp-input-2', 'otp-input-3', 'otp-input-4']
};
}
}
</script>
boolean
Specifies whether the OTP input field should automatically receive focus when the component is rendered.
string
Defines one or more CSS classes that can be used to customize the appearance of the Otp (One-Time Password) input component.
boolean
Specifies whether the Otp input component is disabled. When set to true, the component is disabled and user input is not allowed.
boolean
Enable or disable persisting component’s state between page reloads.
boolean
Enable or disable rendering component in right to left direction.
{ : }
Specifies additional HTML attributes to be applied to the Otp (One-Time Password) input component.
<template>
<ejs-otpinput id='otpInput' :htmlAttributes="htmlAttributes"></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {
data() {
return {
htmlAttributes: { name: "otp-input" }
};
}
}
</script>
number
Specifies the length of the Otp (One-Time Password) to be entered by the user. This determines the number of input fields in the Otp Input.
<template>
<ejs-otpinput id='otpInput' length='4'></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {}
</script>
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
string
Specifies the text that is shown as a hint/placeholder until the user focuses on or enters a value in the Otp Input. If a single text is provided, it will be used for all input fields; otherwise, each text letter will be used for each field.
<template>
<ejs-otpinput id='otpInput' placeholder='x'></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {}
</script>
string
Specifies the separator used to separate each input field in the Otp Input component. The separator is displayed between each input field.
<template>
<ejs-otpinput id='otpInput' separator='/'></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {}
</script>
string
| OtpInputStyle
Specifies the style variant for the input fields in the Otp Input component.
<template>
<ejs-otpinput id='otpInput' stylingMode='outlined'></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {}
</script>
string
| TextTransform
Specifies the case transformation for the OTP input text. Valid values are:
TextTransform.Uppercase
for uppercase transformation.TextTransform.Lowercase
for lowercase transformation.TextTransform.None
for no transformation. string
| OtpInputType
Specifies the input type of the Otp.
<template>
<ejs-otpinput id='otpInput' type='number'></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {}
</script>
string
| number
Specifies the value of the Otp (One-Time Password) input. This can be a string or a number, representing the Otp value entered by the user.
<template>
<ejs-otpinput id='otpInput' value="1234"></ejs-otpinput>
</template>
<script>
import Vue from 'vue';
import { OtpInputPlugin } from "@syncfusion/ej2-vue-inputs";
Vue.use(OtpInputPlugin);
export default {}
</script>