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.
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
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Video Popup Button”, insert it. Category: Media.
- Configure inspector controls that exist on this block. Open Video Source. Set “Video URL”, “Autoplay when popup opens”, “Muted”, “Button Style”.
- 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
| Control | What the code does |
|---|---|
| Video URL | Text field in the inspector. YouTube, Vimeo, or any direct video/embed URL. Saved as `videoUrl`. |
| Autoplay when popup opens | On/off toggle in the inspector. On by default. Saved as `autoplay`. |
| Muted | On/off toggle in the inspector. Start muted (needed for autoplay in some browsers). Off by default. Saved as `muted`. |
| Button Style | Select 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 Preset | Select control; the chosen value is saved on the block. Options: Small; Medium; Large; Extra Large. block.json default: md. Saved as `buttonSize`. |
| Button Style — Alignment | Select 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 Shadow | On/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 Icon | On/off toggle in the inspector. On by default. Saved as `showIcon`. |
| Icon Style | Select 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`. |
| Position | Select 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 Subtext | On/off toggle in the inspector. Off by default. Saved as `showSubtext`. |
| Aspect Ratio | Select 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 Blur | On/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 click | On/off toggle in the inspector. On by default. Saved as `closeOnOverlay`. |
What the front-end script actually does
- 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.
- Keyboard handlers move focus between items.
When this is the right block
- A stylizable play button that opens a YouTube, Vimeo, or custom video in a modern full-screen popup modal — that is the job of Video Popup Button, not a generic content block.
- Use it when you need the editor control labeled “Video URL”, which exists on this block’s inspector.
- It matches pages about video, popup, modal.
- Inserter grouping: video, animation, and rich media sections.
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
Video Facade
Performance-optimized video thumbnail that loads the actual YouTube or Vimeo player only on click. Eliminates heavy iframes on page load, improving Core Web Vitals. Supports custom thumbnails, overlay text, and animated play buttons.
Video Grid
Responsive grid of video cards with play-in-lightbox functionality. Supports YouTube, Vimeo, and self-hosted videos. Custom thumbnails, titles, and duration badges.
Background Video
A looping autoplay background video section with overlay and InnerBlocks content — distinct from video players or popups.
Sticky Video
Video player that minimises into a floating corner player when scrolled past, with close and restore controls.
Video Playlist
A video player paired with a clickable episode/chapter list — perfect for course previews, tutorial series and video podcasts.
Embed / iFrame
Responsive iframe embed for Calendly, Typeform, Google Forms, Airtable, YouTube, Vimeo, or any URL. Full aspect-ratio control and loading options.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Video Popup Button from the Gutenberg inserter.