JSFiddle - React, Tailwind, and code Playground
by Zenoo0
HTML
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk&libraries=places"></script>
<script src="https://gitcdn.link/cdn/Zenoo/address-search/v1.12.6/address-search.min.js"></script>
<link rel="stylesheet" href="https://gitcdn.link/cdn/Zenoo/address-search/v1.12.6/address-search.min.css">
<p>Search your address here:</p>
<p><input type="text" class="search"></p>
<p>Route:</p>
<p><input type="text" name="route" disabled></p>
<p>Locality:</p>
<p><input type="text" name="locality" disabled></p>
<p>Country:</p>
<p><input type="text" name="country" disabled></p>
<p>Country (Short name):</p>
<p><input type="text" name="country_short" disabled></p>
JavaScript
let address = new AddressSearch('.search', {
route: '[name="route"]',
locality: '[name="locality"]',
country: '[name="country"]',
country_short: '[name="country_short"]'
})
.onSelect(function(place) {
console.log(place);
});