Skip to content
caliper ui pro docs

Video dialog

A video behind its poster. A press opens a player that grows out of the poster's own place and shrinks back into it on close. It is a real dialog with the browser's controls; it plays on open and stops on close.

Pro

Elias Kim · Workplace

When to use

  • A product walkthrough or recorded demo on a page that should not autoplay video.
  • A help article with a short screen recording.

When not to use

  • Background or decorative video; that should not need a press.
  • Long talks; link to a player page.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/video-dialog

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

VideoDialog

6 props
PropTypeDefaultDescription
src *string—The video file.
poster *string—The still shown before playing.
title *string—Names the video on the poster's button and in the dialog.
durationstring—Shown on the poster, e.g. "2:14".
captionsstring—A WebVTT captions file.
classNamestring—

Keyboard

  • Keyboard and focus come from Radix dialog: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Accessibility

It is built on native elements and keeps aria-label and aria-describedby in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/video-dialog.md

The index of every part is at /llms.txt.

More in Compare & browse