PhoneInput
FormAn international phone number input with a searchable country code selector.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | "" | Full phone number with dial code (v-model). |
placeholder | string | "6 00 00 00 00" | Placeholder for the number input. |
disabled | boolean | false | Disables the input. |
Examples
Default
vue
<script setup>
const phone = ref('')
</script>
<template>
<DsPhoneInput v-model="phone" placeholder="6 00 00 00 00" />
</template>Skeleton
Use DsPhoneInputSkeleton as a loading placeholder while content is being fetched.
Default
vue
<DsPhoneInputSkeleton />Accessibility
- Country selector has aria-expanded.
- Country list is keyboard navigable.
- type="tel" on the phone input.
