Pixel UI/Text/Counter

Counter

A big number that counts up in pixel type when it scrolls into view.

<piix-stat>DOM + canvas
teams building with it
Tone

The number rolls up from zero the first time it's on screen, in chunky pixel digits with a hard shadow, and each digit flickers as it changes. Whatever you put inside is the label under it.

Installation

<!-- once, anywhere on the page: every component -->
<script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>

Usage

<piix-stat value="12480" suffix="+">teams building with it</piix-stat>

Examples

A stats row

teams uptime saved

API reference

AttributeWhat it doesDefault
valuethe number–
prefixbefore it, like $–
suffixafter it, like + or %–
decimalsdigits after the point0
durationseconds to count1.6
tonelime coral violet sky sun mint ink paperlime

Accessibility