Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/webmaster/llms.txt
Use this file to discover all available pages before exploring further.
VisitorCounter recreates the iconic 7-segment LED counter that lived in the sidebar of every GeoCities page. It displays a 6-digit zero-padded number in red-on-black with a soft neon glow — as if each digit is lit from within by a tiny cathode-ray tube. On mount, it ticks from 001336 to 001337 after a 1.5-second delay, giving the visitor the satisfying sensation of being the one who pushed the number over.
Props
VisitorCounter accepts no props. The starting count and the tick-up delay are baked into the component.
Drop
<VisitorCounter /> anywhere in your layout — no configuration required.Counter Logic
The component initializes state at1336. A useEffect runs once on mount and schedules a setTimeout of 1500ms that increments the count by one. The cleanup function clears that timer if the component unmounts before it fires.
count becomes 1337 — a deliberate easter egg for the technically inclined visitor.
Digit Rendering
The count is formatted as a 6-character zero-padded string, then split into individual characters so each digit gets its own styleddiv:
div carries the following classes and inline style:
| Style detail | Value | Effect |
|---|---|---|
bg-zinc-800 | dark grey cell background | individual segment housing |
text-red-500 | Tailwind red-500 | bright LED red digit |
font-pixel | custom pixel font | dot-matrix character rendering |
text-3xl | 1.875rem | large, easily readable digit |
border border-zinc-600 | medium grey border | segment cell boundary |
shadow-inner | inset box shadow | recessed-screen depth effect |
textShadow: '0 0 5px rgba(255,0,0,0.5)' | 5px red glow | neon LED bloom |
Container Styling
The outer wrapper centers the label and digit panel vertically:font-comic text-sm font-bold— the “YOU ARE VISITOR:” label uses Comic Sans (viafont-comic) in bold small capsbg-black p-2 bevel-container-inset— the digit panel sits on a pure black background inside a custombevel-container-insetclass that adds an inset bevel border, replicating the look of a real LCD housingflex gap-1— digits are laid out in a row with a 4px gap between cells
The
bevel-container-inset utility is a custom Tailwind class defined in the project’s global CSS. It applies an inset box-shadow to simulate the beveled plastic border of a physical LED display.Usage
Drop<VisitorCounter /> anywhere in your layout. In the Webmaster project it lives in the homepage sidebar, but it will work in any container: