Every self-respecting GeoCities page sported a hit counter in the footer — a proud declaration of internet fame measured in four-digit numbers.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retro-webpage/llms.txt
Use this file to discover all available pages before exploring further.
VisitorCounter recreates that experience with individual LCD-style digit tiles rendered in green VT323 font on a black background. One second after mount, the count ticks from 001336 to 001337, simulating the arrival of a new visitor (you!) in real time.
Props
VisitorCounter accepts no props. The initial count and increment logic are baked into the component.
The counter always starts at
1336 and transitions to 1337 after a 1-second setTimeout. This is intentional: the joke is that your page just hit 1337 (leet) visitors — a classic internet Easter egg.Usage
Behavior & Animation
Digit rendering — The current count is converted to a string, left-padded with zeroes to 6 characters (e.g."001337"), then split into individual characters. Each digit is rendered as its own w-6 h-8 <div> styled with:
bg-blackbackgroundtext-retro-lime(#bef264) text color via the VT323 font family- A subtle
border border-gray-800separator between digits - The parent row uses
bevel-insetto give the display a recessed LCD-panel appearance
setTimeout of 1000 ms fires a setState call that bumps the count from 1336 to 1337. React re-renders only the digit tile that changed (6 → 7), creating a satisfying single-digit flip effect without any additional animation library.
Cleanup — The useEffect returns the clearTimeout handle, so the timer is safely cancelled if the component unmounts before the second elapses (e.g. during fast navigation).
The label
"YOU ARE VISITOR NO." above the counter uses the font-pixel Tailwind utility. Make sure your Tailwind config maps font-pixel to a suitable bitmap/pixel font for the full retro effect.