JSFiddle - React, Tailwind, and code Playground
HTML
<label for="p">Password</label><input id="p" type="password" />
CSS
input{background:transparent; position: absolute; top: 100px; left: 200px;}
label{ position: absolute; }
JavaScript
var elm = $('input').position();
$('label').css("top", elm.top).css("left", elm.left);
$('#p').focus(function(){
$('label').css('color', '#ccc');
});
//hide the placeholder if something is typed
$('#p').keyup(function(){
$(this).val() != '' ? $('label').hide() : $('label').show()
});