Theme Documentation
Verification Code Input
A component for inputting SMS verification codes, with support for sending codes and countdown display.
Component Examples
Basic Example
Basic usage example, showing the default verification code input.
300px
Preset Value
You can preset a verification code using the model-value property.
300px
Disabled Send Button
You can control the disabled state of the send button with the can-send property.
300px
Loading State
Show loading state during verification code sending.
300px
Countdown
Countdown starts automatically after sending a code, preventing frequent requests.
300px
Form Integration
Using the verification code input with a phone input in a form.
300px
Features
- Integrated send code button
- Countdown functionality
- Automatic button state management
- Loading state display
- Can be used with phone input
Component Properties
Property | Description | Type | Default |
---|---|---|---|
id | The ID of the input field, defaults to 'verificationCode' | string | verificationCode |
model-value / v-model | The bound value, verification code string | string | '' |
required | Whether the field is required | boolean | false |
can-send | Whether sending verification code is allowed | boolean | true |
loading | Loading state during send request | boolean | false |
sent-at | Timestamp when the verification code was sent | number | 0 |
countdown-duration | Countdown duration in seconds, default is 60 | number | 60 |
Component Events
Event | Description | Parameters |
---|---|---|
update:model-value | Triggered when the input value changes | : : : : : : |
send-code | Triggered when the send code button is clicked | No parameters |
Design Empowers, Innovation Unlimited