Turn any input into an address autocomplete with Vue Places
vue-places
The Vue Places component allows the user to search any address in the given territory with autocomplete powered by Algolia Places. Based on places.js for Vue 2.x.
Example
Installation
yarn
yarn add vue-places
npm
npm install vue-places --save
Usage
App.vue
<template>
<div id="app">
<div>
<places placeholder="Where are we going ?"
:options="{ countries: 'FR' }"
>
></places>
</div>
</div>
</template>
<script>
import Places from 'vue-places'
export default {
components: {
Places
}
}
</script>
Searching only in France:
You can change the countries to search in. You must pass an array of two letters country codes according to ISO 639-1(Officially assigned code elements for countries). For more options visit Algolia Places Documentation. Vue Places is on npmjs.com