JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" class="input-box">
JavaScript
var fruits = ['Apples', 'Oranges'];
$(function () {
$(".input-box").autocomplete({
source: fruits
}).change(hello);
});
function hello() {
alert("Hi there!");
}