Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retrowin/llms.txt
Use this file to discover all available pages before exploring further.
RetroWindow is the primary layout shell of the RetroWin portfolio. It wraps any page content in a pixel-perfect Windows 98 window frame — complete with a navy title bar, three control buttons, and an optional Internet Explorer–style address bar. The window can be freely dragged around the desktop using Framer Motion and toggled into a full-screen maximized state. Every route in the app renders its content inside a RetroWindow.
Props
The text displayed in the Windows 98 title bar at the top of the window. Keep it short — it renders in a bold pixel font at small size.
The content rendered inside the scrollable window body. Accepts any valid React children.
An optional icon element (e.g. an
<img> or inline SVG) rendered to the left of the title text in the title bar.When provided, renders an Internet Explorer–style address bar below the title bar, showing a globe icon followed by the supplied URL string.
Called when the user clicks the X button. If omitted, clicking X navigates to
'/' via React Router’s useNavigate.The initial position of the window on the desktop as
{ x, y } pixel offsets. Defaults to { x: 50, y: 50 }.Window width in pixels. Defaults to
600. Ignored when the window is maximized.Window height in pixels. Defaults to
400. Ignored when the window is maximized.Additional CSS class names applied to the outermost window element. Defaults to
"".Usage
Behavior
Dragging
The window uses Framer Motion’sdrag prop with dragMomentum: false for crisp, immediate repositioning. Dragging is scoped to the .window-drag-handle class on the title bar — clicking the window body does not initiate a drag. When the window is maximized, dragging is disabled.
Maximize
Clicking the □ button toggles thet boolean state. When true, the window expands to fill the entire viewport (inset-0, z-50, width: 100%, height: 100%) and the !transform-none utility removes any residual translate from the drag state. Clicking □ again restores the original width and height.
Close
Clicking X callsonClose if it is provided. Otherwise it calls navigate('/') from useNavigate(). The window is not unmounted by RetroWindow itself — the parent route is responsible for removing the component from the tree.
Minimize
The _ (minimize) button is rendered but is currently decorative — it has no click handler and does not hide the window.Internal State
| State variable | Type | Description |
|---|---|---|
t | boolean | Tracks whether the window is currently filling the viewport. Toggled by the □ button. |
RetroWindow must be rendered inside a React Router context because it uses useNavigate() internally for the default close behaviour.