JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div style="width:400px;background-color:black; height:50px">
<div id="error" style="background-color:red; color:white; display:none; width:120px">the error message</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').slideDown('slow', function () {
// Animation complete.
});
});
});