Test Result Tally
A copy-paste code & terminal component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Code & TerminalHTMLCSSany framework
201234passed
0012failed
Copy into your project
HTML
<!-- Test Result Tally — odometer-style digit reels loop through counts, progress bar fills once -->
<div class="nuda-ct2-test-tally">
<div class="nuda-ct2-test-tally__row is-pass">
<svg class="nuda-ct2-test-tally__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12 L10 17 L20 7" />
</svg>
<span class="nuda-ct2-test-tally__count">
<i>2</i>
<span class="nuda-ct2-test-tally__reel">
<span class="nuda-ct2-test-tally__track"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b></span>
</span>
</span>
<span class="nuda-ct2-test-tally__label">passed</span>
</div>
<div class="nuda-ct2-test-tally__row is-fail">
<svg class="nuda-ct2-test-tally__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 6 L18 18 M18 6 L6 18" />
</svg>
<span class="nuda-ct2-test-tally__count">
<i>0</i>
<span class="nuda-ct2-test-tally__reel">
<span class="nuda-ct2-test-tally__track nuda-ct2-test-tally__track--fail"><b>0</b><b>1</b><b>2</b></span>
</span>
</span>
<span class="nuda-ct2-test-tally__label">failed</span>
</div>
<div class="nuda-ct2-test-tally__bar"><span class="nuda-ct2-test-tally__fill"></span></div>
</div>CSS
.nuda-ct2-test-tally {
width: 290px;
background: #09090b;
border: 1px solid rgba(255,255,255,.08);
border-radius: 8px;
padding: 12px 14px;
font: 500 12px ui-monospace,SFMono-Regular,Menlo,monospace;
color: #cfcfcf;
display: flex;
flex-direction: column;
gap: 8px;
}
.nuda-ct2-test-tally__row {
display: flex;
align-items: center;
gap: 8px;
}
.nuda-ct2-test-tally__icon {
width: 13px;
height: 13px;
flex-shrink: 0;
}
.nuda-ct2-test-tally__row.is-pass .nuda-ct2-test-tally__icon {
color: #e4ff54;
}
.nuda-ct2-test-tally__row.is-fail .nuda-ct2-test-tally__icon {
color: #ff6363;
}
.nuda-ct2-test-tally__count {
display: inline-flex;
align-items: baseline;
font-weight: 700;
color: #fafafa;
min-width: 28px;
}
.nuda-ct2-test-tally__count i {
font-style: normal;
}
.nuda-ct2-test-tally__reel {
display: inline-block;
overflow: hidden;
height: 1em;
width: .62em;
vertical-align: baseline;
}
.nuda-ct2-test-tally__track {
display: flex;
flex-direction: column;
will-change: transform;
animation: _nuda-ct2testtallypass 3s steps(5) infinite;
}
.nuda-ct2-test-tally__track b {
display: block;
line-height: 1;
height: 1em;
}
.nuda-ct2-test-tally__track--fail {
animation: _nuda-ct2testtallyfail 3s steps(3) infinite;
}
.nuda-ct2-test-tally__label {
color: #777;
}
.nuda-ct2-test-tally__bar {
position: relative;
height: 4px;
background: rgba(255,255,255,.08);
border-radius: 2px;
overflow: hidden;
margin-top: 2px;
}
.nuda-ct2-test-tally__fill {
position: absolute;
inset: 0;
transform-origin: left;
transform: scaleX(0);
background: linear-gradient(90deg,#e4ff54,#38bdf8);
animation: _nuda-ct2testtallyfill 1.2s cubic-bezier(.4,0,.2,1) .2s forwards;
}
@keyframes _nuda-ct2testtallypass {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-4em);
}
}
@keyframes _nuda-ct2testtallyfail {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-2em);
}
}
@keyframes _nuda-ct2testtallyfill {
to {
transform: scaleX(.92);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ct2-test-tally__track {
animation: none;
transform: translateY(-4em);
}
.nuda-ct2-test-tally__track--fail {
transform: translateY(0);
}
.nuda-ct2-test-tally__fill {
animation: none;
transform: scaleX(.92);
}
}
How to use Test Result Tally
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.