JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" id='one' value='one' />
<input type="button" id='two' value='two' />

CSS

* {
    transition-duration: 5s;
    -webkit-transition-duration: 5s;
    -moz-transition-duration: 5s;
    -ms-transition-duration: 5s;
    -o-transition-duration: 5s;
}

JavaScript

$("#two").on('click',function(){
    var word = $("<div style='opacity: 0; height:0'>word</div>"); 
    $('body').prepend(word); 
    setTimeout(function(){word.css({height: 100, opacity: 1});},0); 
});

$("#one").on('click',function(){
    var word = $("<div style='opacity: 0; height:0'>word</div>");
    $('body').prepend(word); 
    word.css({height: 100, opacity: 1});
});