Web Components On Fire
Numbers that shoot up in value are oddly satisfying and even though they’ve become something of a landing page trope, they’re still kinda fun.
To add a counter, first add this script to your page:
Then you can just wrap your number in the <hotfx-counter>
custom element.
<hotfx-counter>42</hotfx-counter>
That’s actually all you need to get this working, but let’s see how you can customize the behavior and styles of the menu.
If you wish to make any bigger changes to the menu, you may want to read the source code or checkout the GitHub repo for HotFX. If you find any bugs or have feature requests, please open an issue on the repo and we’ll be happy to take a look.