Skip to main content

React Lite YouTube Embed

Private, performant YouTube embeds for React. Under 5KB gzipped.

See it in Action

This embedded video below uses React Lite YouTube Embed. Notice how fast it loads compared to a standard YouTube iframe.

< 5KBTotal Size
~500KBSaved vs iframe
0 CookiesUntil user clicks

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"
/>
);
}

That's it! You now have a performant, private YouTube embed. 🎉