?

Video

Embed local video files or YouTube/Loom/Vimeo iframes.

componentvideo
Edit on GitHub

Overview

The Video component handles two modes: local video files via src and embedded iframes via embed. Provide exactly one — both or neither will throw an error. Local videos autoplay muted with a reduced-motion fallback.

Props

PropTypeDefaultDescription
srcstringPath to a local video file (relative or absolute)
embedstringURL for iframe embed (YouTube, Loom, Vimeo)
loopbooleantrueLoop the video (local only)
autoplaybooleantrueAutoplay muted (local only, disabled on reduced-motion)
mutedbooleantrueMute audio (local only)
captionstringOptional caption below the video
posterstringPoster image shown before play (local only)
categorystringAuto-injected by MDX component map
slugstringAuto-injected by MDX component map

Usage

Local video:

<Video src="demo.mp4" caption="Quick walkthrough of the setup process." />

Embedded video:

<Video embed="https://www.youtube.com/embed/dQw4w9WgXcQ" caption="Product overview." />

Allowed embed hosts

Embeds are restricted to: youtube.com, youtube-nocookie.com, loom.com, vimeo.com, supercut.ai.