HudNav is the primary navigation component for sys-core. It renders a fixed overlay bar styled as a spacecraft heads-up display panel, overlaying the entire viewport with corner-bracket decorations, a live stardate readout, status telemetry, and a centred pill-style nav rail linking to all seven portfolio pages. On large screens the nav rail is always visible; on smaller viewports it collapses behind a hamburger toggle labelledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/sys-core/llms.txt
Use this file to discover all available pages before exploring further.
NAV_ARRAY.
Navigation Links
Each link is defined as an entry in the internallinks array, carrying a human-readable label, a route path, and a two-character channel code displayed in the mobile drawer.
| Label | Hash path | Channel code |
|---|---|---|
| HOME | #/ | CH_00 |
| ABOUT | #/about | CH_01 |
| PROJECTS | #/projects | CH_02 |
| SKILLS | #/skills | CH_03 |
| WRITING | #/writing | CH_04 |
| CASE STUDIES | #/case-studies | CH_05 |
| CONTACT | #/contact | CH_06 |
sys-core uses
HashRouter from React Router, so all navigation paths are
prefixed with # in the browser URL bar (e.g. /#/about). The path values
in the links array are the bare React Router paths (/, /about, …) — the
hash prefix is handled automatically by the router.Usage
PlaceHudNav once at the application root, outside the router outlet so it persists across page transitions. In the default sys-core setup it sits alongside the cosmic background layers and wraps the AnimatePresence-driven route tree:
HudNav positions itself with position: fixed; inset: 0 and a z-index of 50, so it floats above all page content without affecting document flow. All interactive regions use pointer-events-auto selectively, keeping the underlying canvas and page scrollable.
Active State
HudNav reads the current location with React Router’suseLocation hook and compares each link’s path to location.pathname. The matching algorithm is path-prefix aware:
- The HOME link (
/) only matches whenpathnameis exactly/. - All other links match when
pathname.startsWith(path), so nested sub-routes stay highlighted correctly.
text-cyan-signal colour class. A shared-layout motion.span with layoutId="nav-active-pill" animates a glowing cyan pill smoothly between buttons as the active route changes — a Framer Motion layout animation driven by a spring (damping: 22, stiffness: 260).
useNavigate (via React Router’s navigate helper) also closes the mobile drawer automatically through a useEffect that watches location.pathname.
HUD Overlay Elements
Beyond the nav rail, HudNav renders several static telemetry readouts that reinforce the spacecraft HUD aesthetic:| Position | Content |
|---|---|
| Top-left | Pulsing cyan dot + live STARDATE (YYYY.DDD format, refreshed hourly) |
| Top-right | ALL SYSTEMS NOMINAL in mint-comms; UPLINK: SECURE beneath it in off-white/50 |
| Bottom-left | > Currently Debugging Reality_ flavour text in violet-glow |
| Bottom-right | LOC: + the current route as an uppercase identifier — ORBITAL_STATION on /, or the path segment uppercased and hyphen-replaced (e.g. LOC: ABOUT, LOC: CASE_STUDIES) |
| All four corners | L-bracket corner decorations in cyan-signal/30 |
Mobile Drawer
On viewports narrower than thelg Tailwind breakpoint, the centred pill rail is hidden and replaced by a NAV_ARRAY toggle button. Tapping it reveals a Framer Motion-animated drawer (initial: { y: -20, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: -20, opacity: 0 }) overlaid on a blurred backdrop, driven by a spring (damping: 24, stiffness: 260). Each link in the drawer shows its label on the left and channel code (CH_00–CH_06) on the right, making the sci-fi aesthetic consistent at all screen sizes.
Customisation
Nav destinations are defined in a single array at the top ofHudNav.js. To add, remove, or rename a route, edit that array:
<Route> in your router and create the page component. The active-state logic and mobile drawer will pick up the new link automatically.
Dependencies
| Dependency | Role |
|---|---|
react-router-dom | useLocation, useNavigate for active-state detection and navigation |
framer-motion | Layout animation for the active pill; entrance/exit for the mobile drawer |
lucide-react v0.522.0 | Menu and X icons in the mobile toggle button |