
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
vertical-video-kit
Advanced tools
A React component library for building vertical video feed experiences like TikTok, Instagram Reels, or YouTube Shorts.
npm install vertical-video-kit
# or
yarn add vertical-video-kit
Make sure to also install the peer dependencies if not already in your project:
npm install react react-dom hls.js
# or
yarn add react react-dom hls.js
The VideoCard component handles video playback with proper lifecycle management:
import { VideoCard } from 'vertical-video-kit';
function VideoItem({ videoUrl, isActive }) {
return (
<div style={{ height: '100vh', width: '100%' }}>
<VideoCard
src={videoUrl}
isActive={isActive}
muted={false}
/>
</div>
);
}
The useVideoPreload hook optimizes bandwidth by preloading adjacent videos:
import { useVideoPreload, VideoCard } from 'vertical-video-kit';
function VideoFeed() {
const videos = ['video1.mp4', 'video2.mp4', 'video3.mp4'];
const [currentIndex, setCurrentIndex] = useState(0);
// Preload adjacent videos
useVideoPreload(videos, currentIndex);
return (
<div>
{videos.map((video, index) => (
<VideoCard
key={index}
src={video}
isActive={index === currentIndex}
muted={true}
/>
))}
</div>
);
}
Here's a complete example of a basic vertical video feed:
import React, { useState, useEffect } from 'react';
import { VideoCard, useVideoPreload } from 'vertical-video-kit';
const VerticalFeed = ({ videos }) => {
const [activeIndex, setActiveIndex] = useState(0);
// Preload adjacent videos
useVideoPreload(videos, activeIndex);
// Handle scroll to determine active video
useEffect(() => {
const handleScroll = () => {
// Simple implementation - in a real app, you'd determine
// which video is most visible in the viewport
const newIndex = Math.floor(window.scrollY / window.innerHeight);
if (newIndex >= 0 && newIndex < videos.length) {
setActiveIndex(newIndex);
}
};
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, [videos.length]);
return (
<div>
{videos.map((videoUrl, index) => (
<div
key={index}
style={{
height: '100vh',
width: '100%',
scrollSnapAlign: 'start'
}}
>
<VideoCard
src={videoUrl}
isActive={index === activeIndex}
muted={false}
/>
</div>
))}
</div>
);
};
export default VerticalFeed;
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | required | URL of the video (supports .mp4 and .m3u8) |
isActive | boolean | required | Whether this video is currently active (plays when true, pauses when false) |
muted | boolean | true | Whether the video should be muted |
useVideoPreload(videoUrls: string[], currentIndex: number)
videoUrls: Array of video URLs to managecurrentIndex: Index of the currently active videoMIT
FAQs
React components for vertical video feeds like TikTok/Reels
We found that vertical-video-kit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.