Elevate Navbar
vault-hyperiux/elevate-navbarFreeComponent
Responsive glass-morphism pill navigation with animated dropdowns, GSAP text-swap hover effects, and a collapsible mobile accordion menu
Install it
npx shadcn@latest add https://vault.hyperiux.com/r/elevate-navbar.jsonSource
1// Built using Hyperiux Vault: https://vault.hyperiux.com23"use client";45import React, { useEffect, useState } from "react";6import { ElevateNavbarMobile } from "./ElevateMobileNav";7import { ElevateNavbarDesktop } from "./ElevateDesktopNav";89const NAV_CONFIG = {10 backgroundColor: "#d8b4fe",11 duration: 0.35,12 navTextDuration: 0.35,13 ctaDuration: 0.4,14 dropdownItemOffsetY: -8,15 dropdownPointerDelay: 0.03,16 staggerItems: true,17 activeColor: "#ffffff",18 inactiveColor: "rgba(255,255,255,0.5)",19 ease: "power2.out",20 ctaBackground: "#ffffff",21 ctaHoverBackground: "#000000",22};2324type ElevateNavbarConfig = typeof NAV_CONFIG;2526interface ElevateNavbarProps extends Partial<ElevateNavbarConfig> {27 navConfig?: Partial<ElevateNavbarConfig>;28}2930export default function ElevateNavbar({ navConfig = {}, ...props }: ElevateNavbarProps) {31 const config = { ...NAV_CONFIG, ...navConfig, ...props };32 const durationValue = config.duration ?? config.navTextDuration;33 const [isMobile, setIsMobile] = useState(false);34 const [hasMounted, setHasMounted] = useState(false);3536 useEffect(() => {37 const checkWidth = () => {38 setIsMobile(window.innerWidth < 1025);39 };4041 queueMicrotask(() => {42 checkWidth();43 setHasMounted(true);44 });4546 window.addEventListener("resize", checkWidth);4748 return () => {49 window.removeEventListener("resize", checkWidth);50 };51 }, []);5253 if (!hasMounted) {54 return null;55 }5657 return (58 <div59 style={{ backgroundColor: config.backgroundColor }}60 className="relative h-screen w-full font-mono text-[0.75vw]"61 >62 {isMobile ? (63 <ElevateNavbarMobile64 menuItems={menuItems}65 cta={cta}66 duration={durationValue}67 ease={config.ease}68 activeColor={config.activeColor}69 inactiveColor={config.inactiveColor}70 />71 ) : (72 <ElevateNavbarDesktop73 menuItems={menuItems}74 cta={cta}75 navTextDuration={durationValue}76 ctaDuration={durationValue}77 dropdownItemOffsetY={config.dropdownItemOffsetY}78 dropdownPointerDelay={config.dropdownPointerDelay}79 staggerItems={config.staggerItems}80 activeColor={config.activeColor}81 inactiveColor={config.inactiveColor}82 ease={config.ease}83 ctaBackground={config.ctaBackground}84 ctaHoverBackground={config.ctaHoverBackground}85 />86 )}87 </div>88 );89}9091const menuItems = [92 {93// … truncated
What it pulls in
npm packages
More from vault-hyperiux
All 120 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 3D Portfolio Slider3d-portfolio-slider | vault-hyperiux | Components | Free | 3 deps | |
| Animated FAQanimated-faq | vault-hyperiux | Components | Free | 2 deps | |
| Animated Formanimated-form | vault-hyperiux | Components | Free | 1 dep | |
| Animated Modalanimated-modal | vault-hyperiux | Components | Free | 1 dep | |
| Tabsanimated-tabs | vault-hyperiux | Components | Free | 1 dep | |
| Animated Toggleanimated-toggle | vault-hyperiux | Components | Free | no deps | |
| Aperture Transitionaperture-transition | vault-hyperiux | Components | Free | 2 deps | |
| Arrow Fill Buttonarrow-fill-button | vault-hyperiux | Components | Free | 1 dep |
