Responsive YouTube video embed with an aspect-ratio container and a loading spinner shown until the iframe finishes loading.
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> ) }