DDBS UI
modals

Media Modal

A dialog that plays a video or audio clip with native controls, a poster and a caption. Without a source it shows the poster and a play badge.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/media-modal.json
Dependencies:lucide-react
Fullscreen

Usage

media-modal-example.tsx
"use client";

import { useState } from "react";
import { MediaModal } from "@dbs/ui";

export default function MediaModalExample() {
  const [open, setOpen] = useState(false);
  return (
    <>
      <button type="button" onClick={() => setOpen(true)} className="h-11 rounded-full bg-ink px-6 text-sm font-medium text-canvas">Watch the reel</button>
      <MediaModal open={open} onOpenChange={setOpen} title="Studio reel 2026" poster="/samples/hero-wave.jpg" caption="Pass a src to play a real video or audio file. Without one, the poster shows with a note." />
    </>
  );
}