Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-os/llms.txt
Use this file to discover all available pages before exploring further.
Desktop is the root visual surface of DevOS. It combines two responsibilities: it renders the icon grid that users interact with to launch apps, and it acts as the mounting point for all open Window components. Every aspect of the desktop — background, icon layout, animated window entrances, and easter-egg decorations — lives in this single component.
Layout
The desktop fills the full viewport minus the 48 px taskbar at the bottom:bg-os-cream provides the base cream colour; bg-desktop-pattern layers a radial-gradient dot pattern on top, evoking a classic OS linen texture. Clicking anywhere on the bare desktop deselects the currently selected icon.
Icon registry
TheI array in Desktop.js is the single source of truth for which apps appear as desktop shortcuts. Each entry has the following shape:
Icon interaction
Icons are rendered in aflex-col flex-wrap column starting at top-left of the desktop. Each icon is a 96 px wide div (w-24).
| Interaction | Effect |
|---|---|
| Single click | Sets the selected icon ID in local state; highlights the icon with bg-os-teal/20 border border-os-teal/30 |
| Double click | Calls openWindow(icon.id, { title, icon, component, defaultSize }) and clears the selection |
| Click on desktop | Clears the selection (handled by the root div’s onClick) |
onDoubleClick handler passes event.stopPropagation() to prevent the desktop click handler from immediately clearing the selection after the window opens.
Recycle Bin
A special Recycle Bin entry is hardcoded at the bottom of the icon column usingmt-auto to push it to the end of the flex column. It uses the Trash2 Lucide icon and does not correspond to any real app entry in the I array. Double-clicking it fires an easter-egg alert:
Window host
All open windows are rendered inside anAnimatePresence block so that exit animations play correctly when a window is closed:
AnimatePresence monitors the windows array from context. When a window is removed (closed), it waits for the exit animation (scale: 0.8, y: 100vh) to complete before removing the DOM node.
Sticky note
A decorative yellow sticky note is absolutely positioned in the top-right corner of the desktop attop-8 right-8. It has a rotate-2 transform for a hand-placed look and contains a hardcoded TODO list:
Desktop.js to customise or clean up the desktop for production.