React Hover Video Player
A React component that makes it dead easy to set up a video that plays on hover.
Features 💡
- Robust support for both mouse and touchscreen interactions
- Easily add custom thumbnails and loading states
- Lightning fast
- No dependencies
- Simple and easy to customize
Quick Start 🏃
Installation
npm install react-hover-video-player
Basic Setup
import HoverVideoPlayer from 'react-hover-video-player';
function MyComponent () {
return (
<HoverVideoPlayer
videoSrc="path-to/your-video.mp4"
pausedOverlay={<img src="thumbnail-image.jpg" alt="" />}
loadingOverlay={<div className="loading-spinner-overlay" />}
/>
);
}