{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "mac-searchbar-shadcnui", "type": "registry:component", "title": "Mac Searchbar", "description": "Mac-style searchbar with animated dropdown, glassmorphism effects, and smooth transitions", "registryDependencies": [ "button" ], "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/search/mac-searchbar.tsx", "content": "\"use client\";\n\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { ArrowRight, Search } from \"lucide-react\";\nimport { useState } from \"react\";\n\ninterface SearchItem {\n id: number;\n icon: string;\n iconBg: string;\n title: string;\n type: string;\n link?: string;\n}\n\nexport function MacSearchbar() {\n const [searchQuery, setSearchQuery] = useState(\"\");\n const [isFocused, setIsFocused] = useState(false);\n\n const items: SearchItem[] = [\n {\n id: 1,\n icon: \"💬\",\n iconBg: \"bg-zinc-700\",\n title: \"WhatsApp\",\n type: \"app\",\n },\n {\n id: 2,\n icon: \"⚫\",\n iconBg: \"bg-zinc-900\",\n title: \"moumen-soliman/ui-tripled\",\n link: \"https://x.com/uitripled\",\n type: \"github\",\n },\n {\n id: 3,\n icon: \"𝕏\",\n iconBg: \"bg-black\",\n link: \"https://x.com/moumensoliman\",\n title: \"Moumen Soliman on X\",\n type: \"twitter\",\n },\n ];\n\n const filteredItems = items.filter((item) =>\n item.title.toLowerCase().includes(searchQuery.toLowerCase())\n );\n\n return (\n
\n \n {/* Search Input */}\n \n \n \n \n setSearchQuery(e.target.value)}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n className=\"w-full bg-transparent text-foreground placeholder:text-muted-foreground rounded-2xl py-4 pl-14 pr-6 text-base border-none focus:outline-none\"\n />\n \n\n {/* Dropdown - Animated */}\n \n {(searchQuery || isFocused) && (\n \n {filteredItems.map((item, index) => (\n {\n if (item.link) {\n window.open(item.link, \"_blank\");\n }\n }}\n className={`flex items-center justify-between px-5 py-3.5 ${item.link ? \"cursor-pointer\" : \"\"} group ${\n index !== filteredItems.length - 1\n ? \"border-b border-white/5\"\n : \"\"\n }`}\n >\n
\n \n {item.icon}\n
\n \n {item.title}\n \n
\n\n {item.link && (\n \n )}\n \n ))}\n\n {/* Contact the Team */}\n \n
\n \n 💬\n \n
\n \n Contact the Team\n \n \n \n )}\n \n \n \n );\n}\n", "type": "registry:component", "target": "components/uitripled/mac-searchbar-shadcnui.tsx" } ] }