TInputOtp / 一次性密码输入
InputOtp provides a segmented input for one-time passwords. Supports auto-focus, paste, backspace navigation, multiple visual styles, and countdown integration. / 一次性密码输入框用于分段的 OTP 验证码输入,支持自动聚焦、粘贴、退格导航、多种视觉风格和倒计时集成。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
length | number | — | Number of digits |
type | 'outlined' | 'filled' | 'underlined' | — | Visual style |
size | 'sm' | 'md' | 'lg' | — | Size |
disabled | boolean | false | Disabled |
mask | boolean | false | Password mode |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TInputOtp } from '@gulcc/tabler-vue'
const code = ref('')
</script>
<template>
<TInputOtp v-model="code" :length="6" />
</template>