1.0.8 • Published 1 year ago
@craydel-v3/craydel-phone-field v1.0.8
CraydelPhoneField
Installation
Get the latest version by NPM:
$ npm i @craydel-v3/craydel-phone-field
Component Import
Import the module chosen directly in your component
<script>
import CraydelPhoneField from "@craydel-v3/craydel-phone-field/src/CraydelPhoneField.vue";
export default {
components: {CraydelPhoneField}
}
</script>
Props
Name | Type | Default | Description |
---|---|---|---|
id | string | random ID | Sets the DOM id on the component. |
is-required | boolean | false | Puts component in a required state. |
required-error | string | 'Field is required' | Puts the component in an error state and passes through the custom required error message. |
country-code | string | undefined | Sets the default country code. |
placeholder | string | undefined | Sets the placeholder for the component. |
disabled | boolean | false | Disables the component. |
fetch-country | boolean | false | Gets the default country code via https://ipwho.is |
Usage
An example showing a phone field.
<craydel-phone-field fetch-country></craydel-phone-field>