modal video player media lightbox demo modal video player media lightbox demo play embed video player modal video lightbox overlay
Modal Video
Fetch pattern JSON:
curl https://webspire.de/patterns/modal/video.json video.html
<div class="flex min-h-64 items-center justify-center">
<button type="button" onclick="this.nextElementSibling.hidden=false" class="rounded-lg bg-[var(--ws-modal-action-bg)] px-5 py-2.5 text-sm font-medium text-[var(--ws-modal-action-text)] shadow transition hover:opacity-90">Play Video</button>
<div class="ws-modal fixed inset-0 z-50 flex items-center justify-center bg-[var(--ws-modal-overlay)] backdrop-blur-sm" hidden>
<div role="dialog" aria-modal="true" aria-labelledby="modal-video-title" class="relative mx-4 w-full max-w-3xl">
<!-- Close button -->
<button type="button" onclick="this.closest('.ws-modal').hidden=true" class="absolute -top-12 right-0 flex h-9 w-9 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/20" aria-label="Close">
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
<!-- Video area (16:9) -->
<div class="relative overflow-hidden rounded-2xl bg-gray-900"> <!-- ws-ok: video backdrop -->
<div class="aspect-video flex items-center justify-center">
<!-- Play icon overlay -->
<div class="flex h-16 w-16 items-center justify-center rounded-full bg-white/20 backdrop-blur-sm transition hover:bg-white/30">
<svg class="ml-1 h-8 w-8 text-white" fill="currentColor" viewBox="0 0 24 24">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>
</div>
<!-- Title -->
<p id="modal-video-title" class="mt-3 text-center text-sm font-medium text-white/90">Product Demo — Getting Started in 2 Minutes</p>
</div>
</div>
</div>
Details
Responsive Dark Mode Tailwind Only SSR Safe Copy & Paste Requires JS
Stable Published
modalvideoplayermedialightboxdemo
Slots
| Name | Required | Description |
|---|---|---|
| video | Yes | Video player or embed area. |
| title | No | Video title text below the player. |
Video modal with a 16:9 dark area, centered play icon overlay (triangle SVG in translucent circle), close button above, and title below. Replace the placeholder with a <video> element or iframe embed for production use.