JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="test" value="Im a placeholder!"/>
JavaScript
var placeholder = $("#test").val();
$("#test").keydown(function() {
if (this.value == placeholder) {
this.value = '';
}
}).blur(function() {
if (this.value == '') {
this.value = placeholder;
}
});