{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "hero-video", "title": "Hero Video", "description": "Video thumbnail with play button that opens a modal player", "dependencies": [ "motion" ], "files": [ { "path": "registry/pioneerui/hero-video.tsx", "content": "\"use client\"\n\nimport React, { useState } from \"react\"\nimport { motion, AnimatePresence } from \"motion/react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface HeroVideoProps extends React.HTMLAttributes {\n videoSrc: string\n thumbnailSrc?: string\n thumbnailAlt?: string\n buttonText?: string\n animationStyle?: \"from-center\" | \"from-bottom\" | \"fade\"\n}\n\nconst PlayIcon = () => (\n \n \n \n)\n\nexport function HeroVideo({\n videoSrc,\n thumbnailSrc,\n thumbnailAlt = \"Video thumbnail\",\n buttonText = \"Watch video\",\n animationStyle = \"from-center\",\n className,\n ...props\n}: HeroVideoProps) {\n const [isOpen, setIsOpen] = useState(false)\n\n const modalVariants = {\n \"from-center\": {\n initial: { opacity: 0, scale: 0.8 },\n animate: { opacity: 1, scale: 1 },\n exit: { opacity: 0, scale: 0.8 },\n },\n \"from-bottom\": {\n initial: { opacity: 0, y: 80 },\n animate: { opacity: 1, y: 0 },\n exit: { opacity: 0, y: 80 },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n },\n }[animationStyle]\n\n return (\n <>\n setIsOpen(true)}\n {...props}\n >\n {thumbnailSrc && (\n \n )}\n\n {/* Play button overlay */}\n
\n
\n
\n \n
\n {buttonText && (\n \n {buttonText}\n \n )}\n
\n
\n \n\n \n {isOpen && (\n setIsOpen(false)}\n >\n e.stopPropagation()}\n {...modalVariants}\n transition={{ type: \"spring\", stiffness: 300, damping: 25 }}\n >\n setIsOpen(false)}\n aria-label=\"Close video\"\n >\n \n \n \n \n \n
\n \n
\n \n \n )}\n
\n \n )\n}\n", "type": "registry:ui", "target": "components/pioneerui/hero-video.tsx" } ], "type": "registry:ui" }