Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/windows-98/llms.txt
Use this file to discover all available pages before exploring further.
DesktopIcon places a classic Windows 98 desktop shortcut on the portfolio’s main canvas. Each icon consists of a 40×40px graphic area above a truncated pixel-font label. Icons fade and scale in when the desktop mounts, support single-click selection highlighting, and trigger navigation or a custom callback on double-click. They are the primary way visitors launch windows and explore the portfolio’s content.
Props
The label text rendered beneath the icon image. Long names are displayed with
leading-tight wrapping up to two lines; anything beyond is hidden.The visual graphic for the shortcut, rendered inside a 40×40px flex container. Pass an SVG, image element, emoji string, or any React node. Icons get a
drop-shadow-md for depth and scale up 110% on hover via a CSS transition.A React Router route path such as
"/projects" or "/about". When provided, a double-click calls useNavigate(path) to perform a client-side route change. Takes precedence over onClick — if both are supplied, path wins.A callback invoked on double-click when no
path prop is supplied. Use this to open a window component managed in local state rather than navigating to a new route.A stagger delay in seconds applied to the Framer Motion entrance animation. Passing incremental values (e.g.
0, 0.1, 0.2) across a set of icons creates a cascade effect as the desktop loads.Single-click vs. double-click behavior
DesktopIcon distinguishes between selection and activation, matching the Windows 98 interaction model:
Single-click — Updates an internal selected boolean to true, visually highlighting the icon. The icon wrapper gains bg-retro-navy/40 and a border-dotted border-retro-navy outline. The label text switches to bg-retro-navy text-retro-white. Selection is cleared when the icon loses focus (onBlur).
Double-click — Triggers navigation or the onClick callback. If path is defined, React Router’s useNavigate is called with that path. Otherwise, onClick is invoked. The component does not track whether a single-click was followed by a second click using a timer — React’s synthetic onDoubleClick event is used directly, so both onClick (selection) and onDoubleClick (activation) fire on a double-click.
Entrance animation
EachDesktopIcon is wrapped in a motion.div from Framer Motion with the following configuration:
delay prop feeds directly into transition.delay. Set staggered delay values across all icons on a page to animate them in sequentially rather than all at once.
Usage
Desktop Page
See how all desktop icons are laid out on the main portfolio canvas.
Win98Window
The window component icons typically open on double-click.
Architecture: Routing
How React Router connects icon paths to page components.
Adding Pages
Add a new desktop icon and route to the portfolio.