JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" />
<div id="results">
    <ul>
    <li>acrtman</li>
        
        <li>Cartman</li>
        <li>Snooker</li>
        <li>Star Wars</li>
        <li>Blue Velvet</li>  
    </ul>
</div>

JavaScript

$("#results").hide();

$("input").keyup(function() {
    if (this.value.length) {
        var that = this;
        $("#results li").hide().filter(function() {
            return $(this).html().toLowerCase().indexOf(that.value.toLowerCase()) !== -1;
        }).show();
        $("#results").show();
    } else {
        $("#results").hide();
    }
});