All components

XEHkit / VideoContainer

Video frame with scroll reveal and a zoom toggle.

Sourcedescription.md

Showreel

/SEE_IT_WORKING

DEVdots is our Linux UI in early development. The showreel shows it coming together.

Live preview. Scroll to see the reveal, or press the corner button to zoom.

VideoContainer

Video section with a scroll-driven reveal and a zoom toggle. The frame scales from 0.55 to 1 and fades in as it approaches the viewport center, driven by requestAnimationFrame on scroll. The video plays only while on screen. Pressing the zoom button (or clicking the frame) expands the video full screen over a dark backdrop; pressing the same button, Escape, or the backdrop returns it to the inline frame.

Props

Prop Type Default Notes
src string unset Explicit video URL. Overrides the rendition picker.
renditions Renditions unset small, medium, and large URLs picked by viewport and data saver.
poster string unset Poster image URL.
eyebrow string unset Eyebrow line above the heading.
heading string unset Section heading.
body string unset Supporting paragraph.
autoPlay boolean true Autoplay the video.
muted boolean true Mute the video. Browsers require this for autoplay.
loop boolean true Loop the video.
playsInline boolean true Inline playback on iOS.
zoomable boolean true Show the zoom toggle button.

Usage

import { VideoContainer } from "@xeh/xehkit/components/video-container/VideoContainer";
import "@xeh/xehkit/xehkit.css";

<VideoContainer
  heading="See it working."
  body="The full stack in motion."
  renditions={{
    small: "/demo-480.mp4",
    medium: "/demo-720.mp4",
    large: "/demo.mp4",
  }}
  poster="/demo-poster.jpg"
/>

Notes

  • Client component. No dependencies beyond React.
  • prefers-reduced-motion pins the scale at 1 and skips the animation.
  • The zoomed view locks body scroll and traps Escape inside the dialog.