JSFiddle - React, Tailwind, and code Playground
HTML
<div class="loading">Loading</div>
CSS
.loading {
font-size: 30px;
}
.loading:after {
overflow: hidden;
display: inline-block;
vertical-align: bottom;
/* animation: ellipsis-dot steps(40, start) 9000ms infinite; */
animation: ellipsis-dot 1s infinite;
animation-fill-mode: fowards;
content: "\2026"; /* ascii code for the ellipsis character */
width: 0em;
}
@keyframes ellipsis {
to { width: 1.25em; }
}