JSFiddle - React, Tailwind, and code Playground
HTML
<input id="search" placeholder="Ieškoti kontaktų" type='text'>
<input id="tags" type="text" value="" data-role="tagsinput">
JavaScript
$("#search").on("click, keyup", function() {
getKon($("#search").val(), $("#tags").val());
});
function getKon(searchVal, tagsVal) {
console.log(searchVal, tagsVal);
}