JSFiddle - React, Tailwind, and code Playground
CSS
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.digit {
display: inline-block;
font: bold 32px monospace;
color: white;
background: black;
margin: 10px;
padding: 10px;
border-radius: 5px;
}
JavaScript
function output(value) {
document.querySelector('div').innerHTML = Array
.from(`${value}`, n => `<span class="digit">${n}</span>`)
.join('');
}
let value = 0;
setInterval(() => output(value++), 100);