JSFiddle - React, Tailwind, and code Playground

HTML

<input type='text'>


<p>Here is a dandy block of text to color up</p>

CSS

span{
   color: red
}

JavaScript

$('input[type=text]').keyup(function() {
    var val = $.trim(this.value);
    var text = $('p').text().split(' ')
    $.each(text, function(i, v) {
        if (v == val) {
            text[i] = '<span>' + v + '</span>';
        }
    })
    $('p').html(text.join(' '))    
})