JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
Input:
<input type="text" id="autocomplete" />
<br/>
<br/>
<br/>
<div id="selected">Nothing</div>selected
<script>
    
</script>

JavaScript

$(function () {
    $("#autocomplete").autocomplete({
        source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"],
        select: function (event, ui) {
            console.log(ui.item);
            $("#selected").text(ui.item.value);
        }
    });
});