JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div style="width:400px;background-color:black;height: 200px;">
<div id="error" style="position: relative; background-color:red; color:white; visibility:hidden; width:120px; height: 50px;">
<div style="position: absolute; bottom: 0;">the error message</div>
</div>
</div>
<div id="button" style="margin-top:20px; background-color:gray; width:70px; cursor:pointer;">click me!</div>
</body>
JavaScript
$(document).ready(function () {
$("#button").click(function () {
$('#error').css('visibility','visible');
});
});