跳到内容

Poppable – The Easy Way to Add a Video Modal

v1.0.0

Engramium · 2021年2月1日 上架

Display YouTube videos in a beautiful, customizable modal popup triggered by any element on your page.

正在使用
10 以下
评分
暂无
累计下载
1,181
最近更新
2026年1月19日
需要 WordPress 6.7+已测试到 6.9.12PHP 7.4+

贡献者

Poppable is a lightweight Gutenberg block that lets you display YouTube videos in a sleek modal popup. Simply add the block, paste your YouTube URL, and connect it to any trigger element on your page.

Key Features:

  • Trigger from Any Element – Assign a trigger ID to any element (button, image, text) and clicking it opens the video modal
  • Multiple YouTube URL Formats – Supports youtube.com/watch?v=, youtu.be/, and youtube.com/embed/ formats
  • Autoplay Support – Optionally start playing the video automatically when the modal opens
  • Customizable Modal Width – Set the content width using px, %, vw, or any CSS unit
  • Multiple Close Options:
    • Close button (X) in the corner
    • Click outside to close
    • Press ESC key to close
  • Responsive Design – Videos maintain 16:9 aspect ratio on all screen sizes
  • Body Scroll Lock – Page scrolling is disabled when the modal is open for a focused viewing experience
  • Lightweight – No jQuery dependencies, built with vanilla JavaScript

Development & Source Code:
Poppable is open-source and developed publicly on GitHub.

GitHub repository: https://github.com/Engramium/poppable

How to Use

  1. Add the Poppable block anywhere on your page (it will be hidden on the frontend).
  2. In the block settings panel, enter your YouTube Video URL.
  3. Set a unique Trigger ID (e.g., poppable-video-modal).
  4. Add the same trigger ID as a CSS class to any element you want to use as the trigger (e.g., a button with class poppable-video-modal).
  5. Configure your preferred close options and modal width.
  6. Save and preview your page!

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums