Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/press-start/llms.txt
Use this file to discover all available pages before exploring further.
ArcadeMenu is the site-wide navigation bar, styled to look like the selection screen of a classic arcade cabinet. It reads the current route from React Router’s useLocation hook and highlights the matching item with a green glow and a magenta underline. Visitors can cycle through routes entirely from the keyboard using the arrow keys, making the interface feel like flipping through cabinet options with a joystick.
Props
This component accepts no props. All routing state is derived internally via React Router’suseLocation and useNavigate hooks.
Usage
Navigation items
The component defines a staticnavItems array with seven routes:
| Path | Label |
|---|---|
/ | HOME |
/about | ABOUT |
/projects | PROJECTS |
/skills | SKILLS |
/writing | WRITING |
/case-studies | CASE STUDIES |
/contact | CONTACT |
Keyboard navigation
Akeydown listener is attached to window inside a useEffect (cleaned up on unmount). The handler finds the index of the current pathname in navItems and then:
ArrowRightorArrowDown— navigates tonavItems[(currentIndex + 1) % navItems.length]ArrowLeftorArrowUp— navigates tonavItems[(currentIndex - 1 + navItems.length) % navItems.length]
event.preventDefault() to stop the browser from scrolling the page. Wrapping is handled by the modulo arithmetic, so pressing left on HOME brings you to CONTACT.
Active vs. inactive styling
Each nav item is a React Router<Link> rendered with conditional classes:
| State | Text color | Caret (►) | Bottom border |
|---|---|---|---|
| Active | text-arcade-green glow-green | opacity-100 animate-blink text-arcade-magenta | border-b-2 border-arcade-magenta |
| Inactive | text-arcade-muted | opacity-0 group-hover:opacity-50 | border-b-2 border-transparent |
| Inactive (hover) | hover:text-arcade-white | fades in at 50 % | border-b-2 border-transparent |
► is placed in a fixed-width w-4 inline block so label text does not shift when the caret appears or disappears.
Layout & stacking
The<nav> element carries sticky top-0 z-40 so it stays at the top of the viewport while the user scrolls. The bottom border is border-b-4 border-arcade-green/30, giving a subtle green scan-line separator. Inner content is a responsive flex-wrap row centred with max-w-6xl mx-auto and gap-x-6 gap-y-4 to handle narrow viewports gracefully.
The keyboard listener fires on every
keydown event at the window level.
If your app has modal dialogs or other keyboard-sensitive widgets, consider
adding a guard so the handler only runs when no modal is open.