Companion demo for How to add shoppable videos to your Next.js site with ImageKit.
A minimal Next.js page that renders a hero video with a synchronized product bar, on-frame hotspots, and a post-play product carousel. The blog post covers the why and how; this README covers running the demo and where to look in the code.
npm install
npm run devOpen http://localhost:3000.
The demo defaults to ImageKit's public ikmedia ID and a sample video, so it works out of the box. To point at your own account, copy .env.local.example to .env.local and set NEXT_PUBLIC_IMAGEKIT_ID.
lib/products.ts: the three product definitions, with highlight windows, hotspot coordinates, and target URLs.components/ShoppableHero.tsx: the only client component. Maps the products into theshoppable.productsshape the player expects.app/page.tsx: page layout.
- Swap
HERO_VIDEO_SRCinlib/products.tsfor any ImageKit-hosted video URL. - Replace each product's
imageUrlwith your own. Thetransformation: [{ width: 200, height: 200 }]inShoppableHero.tsxis applied on top of any params already in the URL. - Add more entries to a product's
hotspotsarray to mark it in multiple frames.
See the shoppable videos guide for the full option reference.
- Next.js 15+
- React 19, TypeScript
- Tailwind CSS v4
@imagekit/video-player