Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/aurora-drift/llms.txt
Use this file to discover all available pages before exploring further.
Nav renders the fixed top navigation bar that persists across all pages of the Aurora Drift portfolio. It reads the current route from React Router’s useLocation hook to highlight the active link, then animates a shared underline element between links using Framer Motion’s layoutId — so the highlight glides smoothly rather than jumping. The bar itself uses a glassmorphism treatment (semi-transparent navy background + backdrop-blur-md) that lets the aurora background bleed through subtly. Like AuroraBackground and CursorGlow, the component is zero-prop and self-contained; all routing and animation logic lives inside it.
Usage
PlaceNav inside your router context (inside <BrowserRouter> or equivalent), above the page outlet. It should be outside AnimatePresence so it stays mounted and can animate the underline across route changes.
Props
Nav accepts no props. It derives active-route state entirely from useLocation.
Route list
The component renders the following eight navigation links. Active detection differs for the root route to avoid false positives fromstartsWith.
| Path | Label | Active rule |
|---|---|---|
/ | Home | Exact match — pathname === '/' |
/about | About | pathname.startsWith('/about') |
/projects | Projects | pathname.startsWith('/projects') |
/skills | Skills | pathname.startsWith('/skills') |
/work | Work | pathname.startsWith('/work') |
/case-studies | Case Studies | pathname.startsWith('/case-studies') |
/blog | Blog | pathname.startsWith('/blog') |
/contact | Contact | pathname.startsWith('/contact') |
Active underline animation
When a link becomes active, a Framer Motionmotion.div with layoutId="nav-underline" is rendered as an absolutely-positioned element at the bottom of that link. Because all instances share the same layoutId, Framer Motion automatically moves the single underline element between links with a spring transition.
from-aurora-turquoise via-aurora-cyan to-aurora-magenta).
Visual specification
Header bar
position: fixed; top: 0; left: 0; right: 0; z-index: 40bg-navy/50 backdrop-blur-md border-b border-white/5Padding:
px-6 py-4 — flex row, space-betweenLogo
Link to
Dot:
Hover:
/ rendering a turquoise dot followed by the text N.L.Dot:
w-2 h-2 rounded-full bg-aurora-turquoiseHover:
shadow-[0_0_10px_rgba(45,212,191,0.8)]Inactive link
text-slate-400 hover:text-aurora-minttext-sm font-medium transition-colors duration-300Active link
text-white — no hover override neededUnderline
motion.div rendered below with gradient fillMobile behaviour
On screens narrower than themd breakpoint (768 px), all navigation links are hidden with hidden md:flex. A hamburger button is rendered in their place:
The hamburger button currently has no
onClick handler wired to a mobile menu. It is a UI stub. To add a mobile drawer, connect the button to a state variable, then conditionally render a full-screen overlay or a slide-in sheet component toggled by that state. A common pattern is to use a Framer Motion AnimatePresence + motion.div drawer, or a headless UI Dialog.How it works
Location read
useLocation() from React Router returns the current { pathname }. This is called on every render so isActive always reflects the live route without any additional state.Link rendering
The route array is mapped to
<Link> elements from React Router. Each link receives the appropriate active/inactive text class based on isActive(path).Shared underline
Each active link renders a
<motion.div layoutId="nav-underline" /> absolutely positioned at bottom: -1px (class -bottom-px). When the active route changes, Framer Motion detects the new instance of the layoutId element and animates the shared node to its new bounding box.