Note: This project is still in development and has not been publicly released. Coming soon.
Docs
YouTube
YouTube

A responsive YouTube video component with privacy-focused embedding and loading states.

12 views
7 downloads
Loading...

Overview

The YouTube component provides a clean, responsive way to embed YouTube videos using the privacy-enhanced youtube-nocookie.com domain. It includes skeleton loading states and mobile-optimized autoplay behavior.

Installation

pnpm dlx shadcn@latest add https://deltacomponents.dev/r/youtube.json

Usage

1"use client"
2
3import YouTube from "@/registry/media/youtube"
4
5export function Component() {
6 return (
7 <div className="w-full max-w-2xl mx-auto">
8 <YouTube videoId="0RXdd0pCJ9Q" />
9 </div>
10 )
11}

API Reference

Parameters

NameTypeDefaultDescription
videoIdstring-The YouTube video ID (extracted from the video URL)
classNamestring""Additional CSS classes to apply to the container
autoplaybooleanfalseWhether to autoplay the video (disabled on mobile)

Features

  • Privacy-focused: Uses youtube-nocookie.com for enhanced privacy
  • Responsive: Maintains 16:9 aspect ratio across all screen sizes
  • Loading states: Shows skeleton while video loads
  • Mobile-optimized: Disables autoplay on mobile devices for better UX
  • Accessible: Includes proper iframe attributes and titles