JSFiddle - React, Tailwind, and code Playground
HTML
<div id="toto" style="background:red;height:200px"></div>
JavaScript
document.getElementById("toto").style.opacity = 0;
window.setTimeout(function(){
document.getElementById("toto").style.transition = "all 5s ease";
document.getElementById("toto").style.opacity = 1;
}, 1);