TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/magical/llms.txt
Use this file to discover all available pages before exploring further.
Navigation component is the persistent top-level header of the Magical Portfolio. It mounts once at the root of the app layout and handles route-linking, active-state indication, and a scroll-triggered visual transition — all animated with Framer Motion.
Scroll Behaviour
On mount, the header is fully transparent with generous vertical padding (py-6). Once the user scrolls past 50px, the header transitions into a frosted glass bar:
| State | Classes applied |
|---|---|
| At top (scrollY ≤ 50) | py-6 (transparent background) |
| Scrolled (scrollY > 50) | bg-mystic-950/80 backdrop-blur-md border-b border-mystic-800/50 py-3 |
initial: { y: -100 } → animate: { y: 0 }, duration 0.8 s, easeOut easing).
Nav Items
Seven routes are defined in the component’snavItems array, each paired with a label and a Lucide React icon:
| Path | Label | Icon |
|---|---|---|
/ | Portal | Sparkles |
/about | Chronicle | Book |
/projects | Grimoire | CodeXml |
/skills | Affinities | Hexagon |
/writing | Tomes | ScrollText |
/case-studies | Rituals | FlaskConical |
/contact | Summon | Send |
Active State & Spring Indicator
Active and inactive nav items are styled differently through Tailwind utility classes:- Active:
text-mystic-mint - Inactive:
text-slate-400 hover:text-mystic-teal
layoutId="nav-indicator") renders an underline marker. When the active route changes, Framer Motion’s layout animation smoothly springs the underline across to the new item — no manual transition code required.
Mobile Behaviour
On viewports narrower than themd breakpoint, the full navigation list is hidden (hidden md:flex). A hamburger button rendered with the Hexagon icon from Lucide React is displayed in its place. Expanding the mobile menu is handled by toggling a local open/closed state in the component.
Usage
Place<Navigation /> once at the root of your app layout, above all page content:
useLocation) and manages its own scroll listener, so no props are required.