JSFiddle - React, Tailwind, and code Playground

by Lawrence Ross

HTML

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;libraries=places"></script>
<input id="autocomplete" placeholder="Enter location" type="text" value="Nebraska, United States" />

CSS

#autocomplete {
    width:300px;
    padding:7px;
}

JavaScript

function initialize() {

    new google.maps.places.Autocomplete(
    (document.getElementById('autocomplete')), {
        types: ['geocode']
    });
}

initialize();