JSFiddle - React, Tailwind, and code Playground
by grendian
HTML
<input type="text"/>
JavaScript
$("input")
.val("Search")
.on("focus", function(){ $(this).val(""); } )
.on("blur", function(){ if( $.trim($(this).val()) == "" ) $(this).val("Search"); });