JSFiddle - React, Tailwind, and code Playground
HTML
<form action="" method="post">
<input type="text" value="Type Your Email" class="field" />
<input type="submit" value="Submit" class="submit" />
</form>
JavaScript
$('.field').on('focus', function () {
if ($(this).val() == 'Type Your Email') {
$(this).val('');
}
});
$('.field').on('blur', function () {
if ($(this).val() == "") {
$(this).val("Type Your Email");
}
});