Why React Lite YouTube Embed?
Blazing Fast
YouTube's standard iframe adds over 500KB and makes dozens of network requests before the user even clicks play. This component loads only a lightweight thumbnail (~10-30KB) until interaction.
Privacy First
Uses youtube-nocookie.com by default, blocking all YouTube cookies and tracking until the user explicitly clicks play. GDPR friendly.
Tiny Bundle
Under 5KB gzipped for both JS and CSS combined. Tree-shakeable, zero dependencies, and works with all modern bundlers.
Accessible
Full keyboard navigation, screen reader support, ARIA attributes, and semantic HTML. WCAG 2.1 compliant.
Full Featured
Player events, programmatic control, playlists, custom thumbnails, SEO structured data, and more. Everything you need.
TypeScript Ready
Written in TypeScript with complete type definitions. IntelliSense support and type safety out of the box.
Quick Start
1. Install
npm install react-lite-youtube-embed
2. Import and Use
import LiteYouTubeEmbed from '@ibrahimcesar/react-lite-youtube-embed';
import '@ibrahimcesar/react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';
export default function App() {
return (
<LiteYouTubeEmbed
id="dQw4w9WgXcQ"
title="Video Title"
/>
);
}