inference-sh

YouTube Embed

Component 32

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>
  )
}

More by inference-sh

View all
  • Sidebar Light

    Sidebar Light

    33
  • Zoomable Image

    Zoomable Image

    24
  • Table of Contents

    Table of Contents

    13
  • Code Block

    Code Block

    4
  • Virtualized List

    Virtualized List