JSFiddle - React, Tailwind, and code Playground

by Oliver Murfett

HTML

<body onload="animate()">
  <h1 id="mainText">Welcome</h1>
</body>

CSS

#mainText {
  margin: 0px;
  display: inline-block;
  font-family: 'Open Sans Condensed', sans-serif;
  font-size: 100px;
  width: 0%;
  transition: width 2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

JavaScript

function animate() {
  document.getElementById("mainText").style.width = "100%";

}