youtube embed

responsive youtube video embed with loading state.

examples

installation

bash
1npx shadcn@latest add https://ui.inference.sh/r/youtube-embed.json

usage

tsx
1import { YouTubeEmbed } from '@/components/youtube-embed'23export function MyVideo() {4  return (5    <YouTubeEmbed6      videoId="dQw4w9WgXcQ"7      title="My Video"8    />9  )10}

props

proptypedescription
videoIdstringyoutube video id