apple-spotlight
obsidianui/apple-spotlightFreeComponent
obsidianui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by obsidianui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://obsidianui.dev/r/apple-spotlight.jsonSource
1'use client';23import { cn } from '@/lib/utils';4import { AnimatePresence, motion } from 'framer-motion';5import {6 Activity,7 Calendar,8 ChevronRight,9 Files,10 Folder,11 Globe,12 Image as ImageIcon,13 LayoutGrid,14 Mail,15 MessageSquare,16 Music,17 Search,18 Settings,19 StickyNote,20 Terminal,21 Twitter22} from 'lucide-react';23import React, { useEffect, useRef, useState } from 'react';2425interface Shortcut {26 label: string;27 icon: React.ReactNode;28 link: string;29}3031interface SearchResult {32 icon: React.ReactNode;33 label: string;34 description: string;35 link: string;36}3738const SVGFilter = () => (39 <svg width="0" height="0">40 <filter id="blob">41 <feGaussianBlur stdDeviation="10" in="SourceGraphic" />42 <feColorMatrix43 values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -9"44 result="blob"45 />46 <feBlend in="SourceGraphic" in2="blob" />47 </filter>48 </svg>49);5051const ShortcutButton = ({ icon, link }: { icon: React.ReactNode; link: string }) => (52 <a href={link} target="_blank">53 <div className="rounded-full cursor-pointer hover:shadow-lg opacity-30 hover:opacity-100 transition-[opacity,shadow] duration-200">54 <div className="size-16 aspect-square flex items-center justify-center">{icon}</div>55 </div>56 </a>57);5859const SpotlightPlaceholder = ({ text, className }: { text: string; className?: string }) => (60 <motion.div layout className={cn('absolute text-gray-500 flex items-center pointer-events-none z-10', className)}>61 <AnimatePresence mode="popLayout">62 <motion.p63 layoutId={`placeholder-${text}`}64 key={`placeholder-${text}`}65 initial={{ opacity: 0, y: 10, filter: 'blur(5px)' }}66 animate={{ opacity: 1, y: 0, filter: 'blur(0px)' }}67 exit={{ opacity: 0, y: -10, filter: 'blur(5px)' }}68 transition={{ duration: 0.2, ease: 'easeOut' }}69 >70 {text}71 </motion.p>72 </AnimatePresence>73 </motion.div>74);7576const SpotlightInput = ({77 placeholder,78 hidePlaceholder,79 value,80 onChange,81 placeholderClassName82}: {83 placeholder: string;84 hidePlaceholder: boolean;85 value: string;86 onChange: (value: string) => void;87 placeholderClassName?: string;88}) => {89 const inputRef = useRef<HTMLInputElement>(null);9091 useEffect(() => {92// … truncated
What it pulls in
npm packages
Files it writes
More from obsidianui
All 111 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ai-inputai-input | obsidianui | Components | Free | 2 deps | |
| alertalert | obsidianui | Components | Free | no deps | |
| animated-tab-baranimated-tab-bar | obsidianui | Components | Free | no deps | |
| avataravatar | obsidianui | Components | Free | 1 dep | |
| badgebadge | obsidianui | Components | Free | 1 dep | |
| breadcrumbbreadcrumb | obsidianui | Components | Free | 2 deps | |
| buttonbutton | obsidianui | Components | Free | 1 dep | |
| button-groupbutton-group | obsidianui | Components | Free | 1 dep |
