TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/cosmic-developer/llms.txt
Use this file to discover all available pages before exploring further.
Navigation component is the primary wayfinding system of the Cosmic Developer portfolio. It sits permanently fixed at the top of every page, rendering a minimal bar that holds the Star Chart brand logo on the left and a hamburger menu trigger on the right. When the trigger is activated, a full-screen overlay unfurls over the viewport — its blurred dark backdrop diffusing the starfield below — and each destination link animates in with a staggered Framer Motion entrance. The result is a navigation experience that feels less like a drop-down menu and more like deploying a mission-briefing screen from orbit.
Usage
Navigation is a zero-prop component. Drop it once inside your app shell and it handles all open/close state internally.
Because
Navigation uses React Router’s NavLink under the hood, it must be rendered inside a <BrowserRouter> (or equivalent router provider). The app shell in main.jsx already satisfies this requirement.Layout
The top bar is positioned withfixed top-0 left-0 w-full z-50 so it floats above every page layer, including the StarfieldBackground and AuroraBackground canvases. Horizontal rhythm is set by px-6 py-4 with flex justify-between items-center splitting the logo and the menu button to opposite ends.
The key visual trick is mix-blend-difference on the <nav> element itself. This CSS blend mode inverts the nav’s foreground colours against whatever sits below it, meaning the white star text and aurora-teal compass icon remain legible whether they’re floating over a pitch-black void or a bright aurora bloom — no semi-transparent background required.
Star Chart Logo
The left slot is a React Router<Link to="/"> containing a Framer Motion <motion.div> that rotates the Lucide Compass icon 180° on hover, paired with the bold uppercase logotype “Star Chart” in the font-heading typeface.
Hamburger Trigger
The right slot is a plain<button> rendering the Lucide Menu icon (w-8 h-8). Clicking it calls setIsOpen(true), which mounts the overlay via AnimatePresence.
Overlay Menu
WhenisOpen is true, AnimatePresence mounts a Framer Motion <motion.div> that covers the entire viewport (fixed inset-0 z-[100]). The overlay animates its opacity from 0 → 1 and its backdropFilter from blur(0px) → blur(16px) simultaneously, producing the characteristic frosted-glass materialisation effect.
Staggered Link Animation
Each nav item is wrapped in its own<motion.div> with an initial of opacity: 0, y: 20 and an animate of opacity: 1, y: 0. The delay is derived from the item’s array index multiplied by 0.05 seconds, creating a cascade that reads from top to bottom:
desc in muted aurora-violet/70 above a large display-heading label in font-heading. A 2px aurora-teal underline bar also animates from w-0 → w-full on hover via an additional <motion.div>.
Close Button
A close button positionedabsolute top-6 right-6 renders the Lucide X icon (w-10 h-10) and calls setIsOpen(false) on click. Its hover colour is aurora-magenta to distinguish it visually from the teal-dominant palette of the links.
Navigation Items
The completenavItems array defined in Navigation.js maps every route in the portfolio:
| Path | Label | Description |
|---|---|---|
/ | Earthrise | Home |
/about | Origin Coordinates | About |
/projects | Probes & Payloads | Projects |
/skills | Instruments | Skills |
/work | Mission Log | Work |
/case-studies | Flight Recordings | Case Studies |
/articles | Transmissions | Articles |
/testimonials | Ground Control Says | Testimonials |
/contact | Open Channel | Contact |
Customizing Nav Items
ThenavItems array lives at the top of Navigation.js, just before the component function definition. Each entry is a plain object with three fields:
label (the large heading displayed in the overlay) and/or the desc (the small monospace descriptor shown above it). The path value must match the React Router route definition in App.jsx.
Active State Styling
Navigation uses React Router’s <NavLink> for each overlay link. The className prop receives a callback that is called with { isActive } — a boolean that is true when the current URL matches the link’s path. The active link receives text-aurora-teal; all others receive text-star-white: