TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/neon-retro-web/llms.txt
Use this file to discover all available pages before exploring further.
Window component is the primary layout primitive of the Neon Retro Web portfolio. It renders every content panel — Projects, About, Skills, and Contact — as a Windows 98/XP-era application window complete with a gradient title bar, beveled Win98-style control buttons, and a snappy spring entrance animation powered by Framer Motion. Drop any JSX into its children and it is instantly wrapped in authentic Y2K chrome.
In the compiled bundle,
Window is exported under the minified name W. When building on top of this project, import from the source file (components/Window.js) to use the readable Window name shown in the examples below.Props
The text displayed in the window’s title bar. Conventionally written in the style of a retro filename, e.g.
"My_Projects.exe" or "About_Me.txt".An optional icon rendered to the left of the title text inside the title bar. Pass any React node — a Lucide icon at
w-4 h-4 works best to match the built-in scale.Additional CSS classes applied to the outermost motion wrapper. Use this to constrain width (
max-w-2xl), add margin, or override layout properties without touching the interior chrome.Controls whether the window appears focused. When
true the title bar renders with a bg-gradient-to-r from-y2k-teal to-y2k-turquoise and the window sits at z-10 with full opacity. When false the title bar falls back to bg-gray-700, the window drops to z-0, and opacity reduces to opacity-80 to suggest it is in the background.Callback fired when the user clicks the close button (the rightmost control button in the title bar). If omitted the close button is still rendered but produces no effect.
Basic Usage
Active vs Inactive State
Windows in the portfolio stack can be layered. TheisActive prop mirrors the focus model of a real desktop OS: the foreground window is vivid and elevated while background windows fade and recede.
- Active (isActive = true)
- Inactive (isActive = false)
When
isActive is true (the default), the window receives:- Title bar:
bg-gradient-to-r from-y2k-teal to-y2k-turquoise— the signature cyan-to-turquoise sweep, withtext-black font-boldtitle text - Z-index:
z-10— sits above inactive siblings - Opacity: full (no modifier applied)
Title Bar Control Buttons
The title bar renders three Win98-style beveled buttons at its right edge — each is aw-5 h-5 bg-gray-300 square with a raised bevel border (border-t-white border-l-white border-b-gray-600 border-r-gray-600):
| Button | Icon | Behavior |
|---|---|---|
| Minimize | minus (Lucide) | No default behavior — wire up via children or state |
| Maximize | square (Lucide) | No default behavior — wire up via children or state |
| Close | x (Lucide) | Calls onClose if provided |
Framer Motion Entrance Animation
EveryWindow mounts and unmounts through a Framer Motion AnimatePresence spring. The animation configuration is baked in and cannot be overridden via props — it is intentionally snappy to reinforce the Y2K “dialog pop” feel:
Wrap Window instances in Framer Motion’s
<AnimatePresence> whenever you conditionally render them so the exit animation plays on unmount.Scrollable Content Area
The inner content wrapper carries two Tailwind classes that are always applied regardless of props:.bg-y2k-bg/80— semi-transparent dark background that lets any canvas or gradient beneath the window bleed through subtly..scrollbar-retro— a custom scrollbar utility defined in the project’s global CSS. It renders a thin teal-on-dark scrollbar styled to match the retro aesthetic.
Nesting Components Inside Window
Window renders its children prop directly inside the styled content area, so any combination of React components works:
RetroElements
Marquee tickers, blinking badges, hit counters, and the Under Construction panel — all designed to nest inside
Window.Framer Motion Docs
Learn more about the spring physics driving the Window entrance animation.