Skip to content

Instantly share code, notes, and snippets.

@lobot
Created May 12, 2022 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lobot/3f1da2cf51000e8efa839810a5c20656 to your computer and use it in GitHub Desktop.
Save lobot/3f1da2cf51000e8efa839810a5c20656 to your computer and use it in GitHub Desktop.
international AC
<script setup>
import AddressAutocomplete from '@lob/vue-address-autocomplete'
import '@lob/vue-address-autocomplete/dist/styles.css'
</script>
<template>
<main>
<label for="country" style="margin-right: 1em">Country</label>
<select name="country" id="country" v-model="countryCode" style="margin-bottom: 1em">
<option value="MX">Mexico</option>
<option value="CA">Canada</option>
<option value="FR">France</option>
<option value="CN">China</option>
</select>
<AddressAutocomplete
apiKey="YOUR_API_KEY_HERE"
isInternational=true
:country="countryCode"
/>
</main>
</template>
<script>
export default {
data() {
return {
countryCode: ""
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment