About
Responsive YouTube video embed with an aspect-ratio container and a loading spinner shown until the iframe finishes loading.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds YouTube Embed to your project and fits it to your theme.
Code
How YouTube Embed is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { YouTubeEmbed } from '@/components/ui/youtube-embed'
export default function YouTubeEmbedDemo() {
return (
<div className="w-full max-w-2xl mx-auto p-4">
<YouTubeEmbed videoId="dQw4w9WgXcQ" title="Example YouTube video" />
</div>
)
}





