Media · Gutenberg

Video Popup Button block for WordPress

A stylizable play button that opens a YouTube, Vimeo, or custom video in a modern full-screen popup modal.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

A stylizable play button that opens a YouTube, Vimeo, or custom video in a modern full-screen popup modal.

Inspector panels on this block: Video Source, Button Style, Button Colors, Button Shadow, Play Icon, Subtext Below Button, Popup Settings. Those titles come from index.js, not from a shared template.

Behavior controls: “Video URL” (YouTube, Vimeo, or any direct video/embed URL); “Muted” (Start muted (needed for autoplay in some browsers)); “Button Style” options: Solid, Outline, Pill (solid), Pill (outline), Gradient; “Size Preset” options: Small, Medium, Large, Extra Large.

Where to find it

Gutenberg inserter → Media → search “Video Popup Button” (block name `blockenberg/video-popup` in block.json). Style it in the sidebar after insert.

How to use Video Popup Button block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Video Popup Button”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Video Source. Set “Video URL”, “Autoplay when popup opens”, “Muted”, “Button Style”.
  4. Check the published page. The view script reads HTML data attributes: data-vp-autoplay, data-vp-bg-hover, data-vp-blur, data-vp-close-color, data-vp-close-overlay, data-vp-max-width, data-vp-muted, data-vp-overlay. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Video URLText field in the inspector. YouTube, Vimeo, or any direct video/embed URL. Saved as `videoUrl`.
Autoplay when popup opensOn/off toggle in the inspector. On by default. Saved as `autoplay`.
MutedOn/off toggle in the inspector. Start muted (needed for autoplay in some browsers). Off by default. Saved as `muted`.
Button StyleSelect control; the chosen value is saved on the block. Options: Solid; Outline; Pill (solid); Pill (outline); Gradient; Ghost (glass). block.json default: solid. Saved as `buttonStyle`.
Size PresetSelect control; the chosen value is saved on the block. Options: Small; Medium; Large; Extra Large. block.json default: md. Saved as `buttonSize`.
Button Style — AlignmentSelect control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: center. Saved as `buttonAlign`.
Padding Vertical (px)Numeric range control in the inspector. Range 4–40. block.json default: 13. Saved as `buttonPaddingV`.
Padding Horizontal (px)Numeric range control in the inspector. Range 8–80. block.json default: 26. Saved as `buttonPaddingH`.
Border Radius (px)Numeric range control in the inspector. Ignored for Pill styles (always fully rounded). Range 0–40. block.json default: 8. Saved as `buttonBorderRadius`.
Spacing Above (px)Numeric range control in the inspector. Range 4–32. block.json default: 8. Saved as `subtextSpacing`.
Gradient Angle (deg)Numeric range control in the inspector. Range 0–360. block.json default: 135. Saved as `gradientAngle`.
Border Width (px)Numeric range control in the inspector. Range 1–8. block.json default: 2. Saved as `buttonBorderWidth`.
Enable ShadowOn/off toggle in the inspector. Off by default. Saved as `showButtonShadow`.
Vertical (px)Numeric range control in the inspector. Range -20–40. block.json default: 8. Saved as `buttonShadowV`.
Blur (px)Numeric range control in the inspector. Range 0–80. block.json default: 24. Saved as `buttonShadowBlur`.
Spread (px)Numeric range control in the inspector. Range -10–30. block.json default: 0. Saved as `buttonShadowSpread`.
Show Play IconOn/off toggle in the inspector. On by default. Saved as `showIcon`.
Icon StyleSelect control; the chosen value is saved on the block. Options: Circle outline + play; Circle filled + play; Triangle only. block.json default: circle. Saved as `iconStyle`.
PositionSelect control; the chosen value is saved on the block. Options: Left of text; Right of text. block.json default: left. Saved as `iconPosition`.
Icon Size (px)Numeric range control in the inspector. Range 12–48. block.json default: 20. Saved as `iconSize`.
Show SubtextOn/off toggle in the inspector. Off by default. Saved as `showSubtext`.
Aspect RatioSelect control; the chosen value is saved on the block. Options: 16:9 — Widescreen (default); 21:9 — Ultrawide; 4:3 — Classic; 1:1 — Square. block.json default: 16-9. Saved as `aspectRatio`.
Max Width (px)Numeric range control in the inspector. Range 320–1600. block.json default: 900. Saved as `popupMaxWidth`.
Content Border Radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 12. Saved as `popupBorderRadius`.
Backdrop BlurOn/off toggle in the inspector. On by default. Saved as `overlayBlur`.
Blur Amount (px)Numeric range control in the inspector. Range 2–24. block.json default: 8. Saved as `overlayBlurAmount`.
Close on overlay clickOn/off toggle in the inspector. On by default. Saved as `closeOnOverlay`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Video Popup Button block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Video Popup Button”. It sits under Media. After insert, open Video Source and set “Video URL”, “Autoplay when popup opens”, “Muted”, “Button Style”.

What makes Video Popup Button different from other Blockenberg blocks?

A stylizable play button that opens a YouTube, Vimeo, or custom video in a modern full-screen popup modal. Inspector labels on this block include “Video URL”, “Autoplay when popup opens”, “Muted”, “Button Style”.

Is the Video Popup Button Gutenberg block free?

Yes. Video Popup Button ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Video Popup Button to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Video Source, Button Style, Button Colors, Button Shadow).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Video Popup Button from the Gutenberg inserter.

Get Blockenberg