JSFiddle - React, Tailwind, and code Playground

by lustre

HTML

<div>
<label>Search for your country...</label>
<input type="text" class="find-country" value="" name="s" id="s" autocomplete="off">
</div>

CSS

label{
  position:absolute;
  left:3px;
  top:3px;
  font-size:12px;
  font-family:sans-serif;
  opacity:0.5;
}

input{
  position:absolute;
  left:0;
  top:0;
  background:transparent;
  border:1px solid black;
}

JavaScript

$('#s').keydown(function(){
	$this = $(this);
  if($this.val().length > 0){
  	$('label').css('display','none');
  } else {
  	$('label').css('display','block');
  }
});