Navbar Exemple 1
bagui/navbar1FreeBlock
Modern responsive navigation bar with animated interactions, customizable links, and mobile menu support.
Live preview
live · rendered by the registry
Rendered by bagUi on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.bagui.pro/r/navbar1.jsonSource
1"use client";23import { useState, useEffect } from "react";4import Link from "next/link";5import { motion, AnimatePresence } from "framer-motion";6import Image from "next/image";78type Theme = "dark" | "light" | "system";910const NAV_LINKS = [11 { label: "Services", href: "#services" },12 { label: "Coverage", href: "#coverage" },13 { label: "Offers", href: "#offers" },14 { label: "Price", href: "#price" },15 { label: "About", href: "#about" },16 { label: "Contact", href: "#contact" },17];1819const SunIcon = () => (20 <svg21 width="14"22 height="14"23 viewBox="0 0 24 24"24 fill="none"25 stroke="currentColor"26 strokeWidth="1.8"27 strokeLinecap="round"28 strokeLinejoin="round"29 >30 <circle cx="12" cy="12" r="4" />31 <path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" />32 </svg>33);3435const MoonIcon = () => (36 <svg37 width="14"38 height="14"39 viewBox="0 0 24 24"40 fill="none"41 stroke="currentColor"42 strokeWidth="1.8"43 strokeLinecap="round"44 strokeLinejoin="round"45 >46 <path d="M21 12.79A9 9 0 1111.21 3a7 7 0 109.79 9.79z" />47 </svg>48);4950const SystemIcon = () => (51 <svg52 width="14"53 height="14"54 viewBox="0 0 24 24"55 fill="none"56 stroke="currentColor"57 strokeWidth="1.8"58 strokeLinecap="round"59 strokeLinejoin="round"60 >61 <rect x="2" y="3" width="20" height="14" rx="2" />62 <path d="M8 21h8M12 17v4" />63 </svg>64);6566const UserIcon = () => (67 <svg68 width="13"69 height="13"70 viewBox="0 0 24 24"71 fill="none"72 stroke="currentColor"73 strokeWidth="1.8"74 strokeLinecap="round"75 strokeLinejoin="round"76 >77 <path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2" />78 <circle cx="12" cy="7" r="4" />79 </svg>80);8182const PlusIcon = () => (83 <svg84 width="12"85 height="12"86 viewBox="0 0 24 24"87 fill="none"88 stroke="currentColor"89 strokeWidth="2.2"90 strokeLinecap="round"91 >92 <path d="M12 5v14M5 12h14" />93 </svg>94);9596export default function Navbar1() {97 const [activeLink, setActiveLink] = useState("Services");98 const [theme, setTheme] = useState<Theme>(() => {99 if (typeof window === "undefined") return "system";100// … truncated
What it pulls in
npm packages
Files it writes
More from bagUi
All 30 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Dashboard Chat Appchat-app1 | bagUi | Blocks | Free | 2 deps | |
| Contact Exemple 1contact-1 | bagUi | Blocks | Free | 2 deps | |
| Contact Exemple 2contact-2 | bagUi | Blocks | Free | 2 deps | |
| CTA Exemple 1cta-1 | bagUi | Blocks | Free | 2 deps | |
| CTA Exemple 2cta-2 | bagUi | Blocks | Free | 2 deps | |
| Modern Ads Dashboarddashboard-ads | bagUi | Blocks | Free | 2 deps | |
| Modern Agency Dashboarddashboard-agency | bagUi | Blocks | Free | 2 deps | |
| Modern Folder Dashboarddashboard-folder | bagUi | Blocks | Free | 2 deps |
