TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/old-windows/llms.txt
Use this file to discover all available pages before exploring further.
Desktop component is the top-level container for the entire Old Windows UI. It owns the desktop icon grid, manages icon selection state, mounts open Window instances, displays a retro LED visitor counter, layers authentic CRT scanline and flicker overlays, and renders the Taskbar at the bottom of the viewport — all on a classic Win98-teal background.
Background and Layout
The desktop fills the full viewport (w-full h-screen) with bg-win-desktop (teal, #008080) and hides overflow. All child elements are positioned relatively or absolutely within this root container.
Clicking anywhere on the bare desktop background clears the currently selected icon by resetting the selection state to null.
Desktop Icons
Icons are read from theapps config array and rendered in an absolute top-4 left-4 column. Each icon is a flex flex-col items-center container that is w-20 wide, with a gap-6 between rows.
Single click — select
Clicking an icon calls
stopPropagation() (so the root click-to-deselect does not fire) and sets the icon’s id as the selected icon. The icon label receives bg-win-navy with a dotted white border to show the navy highlight.The icon emoji is rendered at
text-4xl and receives opacity-70 when selected. The label text uses font-pixel text-xs text-white and gains the navy highlight class only when its id matches the active selection.Visitor Counter
A retro LED-style visitor counter is positionedabsolute bottom-12 right-4 and is pointer-events-none (decorative only).
| Detail | Value |
|---|---|
| Initial count | 1,337,042 |
| Increment trigger | Math.random() > 0.7 every 3 seconds |
| Digit width | w-4 h-6 per digit |
| Font | font-vt323 text-lg |
| Colors | bg-[#111] background, text-[#0f0] green digits |
| Label | "Visitor Count" in text-[10px] text-gray-400 font-pixel |
.toString().padStart(7, "0").
CRT Overlay Effects
Two purely decorativediv elements are appended after all other content:
.crt-overlay— applies scanlines via a global CSS class.crt-flicker— afixed inset-0white div usingmix-blend-overlay opacity-0that animates a subtle screen flicker
pointer-events-none and do not interfere with interaction.
Props
Desktop accepts no props. It reads all window state through the useWindows() hook provided by WindowProvider.
Usage
Desktop must be wrapped in WindowProvider. Without it, the useWindows() hook will throw an error.main.jsx (or your app entry point) should compose the root. The Taskbar is rendered inside Desktop automatically — there is no need to add it separately.