AI SDK Agents
Full Stack AI Patterns
Complex AI Agents
Workflow Patterns
Tools + Artifacts
pnpm dlx shadcn@latest add https://cult-ui.com/r/hover-video-player.json
export default function Example() {
return (
<HoverVideoPlayer
videoSrc="/demo-video.mp4"
thumbnailSrc="/demo-thumbnail.jpg"
/>
)
}| Prop | Type | Default | Description |
|---|---|---|---|
| videoSrc | string | required | URL of the video to play |
| thumbnailSrc | string | - | URL of the thumbnail image |
| hoverOverlay | ReactNode | - | Custom overlay shown while hovering |
| pausedOverlay | ReactNode | - | Custom overlay shown when paused |
| loadingOverlay | ReactNode | - | Custom overlay shown while loading |
| playbackStartDelay | number | 0 | Delay before playing video on hover (ms) |
| restartOnPaused | boolean | false | Reset video position when paused |
| enableControls | boolean | false | Show playback controls |
| muted | boolean | true | Start video muted |
| loop | boolean | true | Loop video playback |
| cropTop | number | 0 | Percentage to crop from top |
| cropBottom | number | 0 | Percentage to crop from bottom |
<HoverVideoPlayer
videoSrc="/demo-video.mp4"
thumbnailSrc="/demo-thumbnail.jpg"
/><HoverVideoPlayer
videoSrc="/demo-video.mp4"
thumbnailSrc="/demo-thumbnail.jpg"
enableControls
/>import { Spinner } from "@/components/ui/spinner"
;<HoverVideoPlayer
videoSrc="/demo-video.mp4"
thumbnailSrc="/demo-thumbnail.jpg"
pausedOverlay={<PlayIcon className="h-12 w-12" />}
loadingOverlay={<Spinner />}
hoverOverlay={<div className="text-white">Now Playing</div>}
/><HoverVideoPlayer
videoSrc="/demo-video.mp4"
thumbnailSrc="/demo-thumbnail.jpg"
cropTop={10}
cropBottom={10}
/>