X Enterprises
nuxt-x-marketing

ModalVideo

Video modal supporting YouTube, Vimeo, and direct video URLs with optional thumbnail trigger and autoplay.

ModalVideo

Opens a video in a modal. Supports YouTube, Vimeo, and direct video URLs — the embed type is detected automatically. Supply a thumbnail prop to show an image with a play button as the trigger, or place a custom trigger in the default slot.

Components

<XMarkModalVideo />

Opens a video in a modal. Supports YouTube, Vimeo, and direct video URLs — the embed type is detected automatically. Supply a thumbnail prop to show an image with a play button as the trigger, or place a custom trigger in the default slot.

<!-- YouTube with thumbnail trigger -->
<XMarkModalVideo
  src="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  thumbnail="/images/video-thumb.jpg"
  title="Product Demo"
  description="See how it works in 3 minutes"
  :autoplay="true"
  size="5xl"
/>

<!-- Button trigger -->
<XMarkModalVideo src="https://vimeo.com/123456789">
  <UButton label="Watch Demo" leading-icon="i-lucide-play" />
</XMarkModalVideo>

Props

PropTypeDefaultDescription
srcStringYouTube exampleVideo URL (YouTube, Vimeo, or direct .mp4)
thumbnailString''Thumbnail image URL — renders as play-button trigger
posterString''Poster image for direct video files
titleString''Title shown in modal footer
descriptionString''Description shown in modal footer
sizeString'4xl'Modal size
autoplayBooleantrueAutoplay video when modal opens
buttonObject{}Default trigger button config { label, color?, variant?, icon?, size? }

AI Context

category: Modal
package: "@xenterprises/nuxt-x-marketing"
components:
  - XMarkModalVideo
use-when: >
  Embedding a video demo or explainer that plays in a modal without
  navigating away from the page. Auto-detects YouTube, Vimeo, and direct
  video URLs.
typical-page-section: Triggered from hero section, features section, or any demo CTA button.
Copyright © 2026