Media · Gutenberg
Embed / iFrame block for WordPress
Responsive iframe embed for Calendly, Typeform, Google Forms, Airtable, YouTube, Vimeo, or any URL. Full aspect-ratio control and loading options.
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
Responsive iframe embed for Calendly, Typeform, Google Forms, Airtable, YouTube, Vimeo, or any URL. Full aspect-ratio control and loading options.
Inspector panels on this block: Embed URL, Dimensions, Iframe Settings. Those titles come from index.js, not from a shared template.
Behavior controls: “URL to embed” (Paste a Calendly, Typeform, Google Form, YouTube, or any iframe-embeddable URL); “Aspect ratio” options: 16:9 (Widescreen video), 4:3 (Classic video), 1:1 (Square), Custom height; “Scrolling” options: Auto, Yes, No; “Loading” options: Lazy (recommended), Eager (load immediately).
Where to find it
Gutenberg inserter → Media → search “Embed / iFrame” (block name `blockenberg/embed` in block.json). Style it in the sidebar after insert.
How to use Embed / iFrame block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Embed / iFrame”, insert it. Category: Media.
- Configure inspector controls that exist on this block. Open Embed URL. Set “URL to embed”, “Accessible title”, “Aspect ratio”, “Height (px)”.
- Check the published page. An IntersectionObserver starts work when the block enters the viewport. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| URL to embed | Text field in the inspector. Paste a Calendly, Typeform, Google Form, YouTube, or any iframe-embeddable URL. Saved as `url`. |
| Accessible title | Text field in the inspector. block.json default: Embedded content. Saved as `title`. |
| Aspect ratio | Select control; the chosen value is saved on the block. Options: 16:9 (Widescreen video); 4:3 (Classic video); 1:1 (Square); Custom height. block.json default: 16:9. Saved as `aspectRatio`. |
| Height (px) | Numeric range control in the inspector. Range 200–2000. block.json default: 600. Saved as `customHeight`. |
| Max width (px, 0 = full) | Numeric range control in the inspector. Range 0–1600. block.json default: 0. Saved as `maxWidth`. |
| Border radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 8. Saved as `borderRadius`. |
| Scrolling | Select control; the chosen value is saved on the block. Options: Auto; Yes; No. block.json default: auto. Saved as `scrolling`. |
| Loading | Select control; the chosen value is saved on the block. Options: Lazy (recommended); Eager (load immediately). block.json default: lazy. Saved as `loading`. |
| Allow fullscreen | On/off toggle in the inspector. On by default. Saved as `allowFullscreen`. |
| Sandbox permissions | Text field in the inspector. Leave blank for no sandbox restriction. Common values: allow-forms allow-scripts allow-same-origin allow-popups. Saved as `sandbox`. |
| Show border | On/off toggle in the inspector. Off by default. Saved as `showBorder`. |
| Border width (px) | Numeric range control in the inspector. Range 1–8. block.json default: 1. Saved as `borderWidth`. |
| Border color | Color control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`. |
| Section background | Color control in the inspector. Saved as `bgColor`. |
| Padding top (px) | Numeric range control in the inspector. Range 0–200. block.json default: 32. Saved as `paddingTop`. |
| Padding bottom (px) | Numeric range control in the inspector. Range 0–200. block.json default: 32. Saved as `paddingBottom`. |
What the front-end script actually does
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- Responsive iframe embed for Calendly, Typeform, Google Forms, Airtable, YouTube, Vimeo, or any URL. Full aspect-ratio control and loading options — that is the job of Embed / iFrame, not a generic content block.
- Use it when you need the editor control labeled “URL to embed”, which exists on this block’s inspector.
- It matches pages about embed, iframe, calendly.
- 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 Embed / iFrame block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Embed / iFrame”. It sits under Media. After insert, open Embed URL and set “URL to embed”, “Accessible title”, “Aspect ratio”, “Height (px)”.
What makes Embed / iFrame different from other Blockenberg blocks?
Responsive iframe embed for Calendly, Typeform, Google Forms, Airtable, YouTube, Vimeo, or any URL. Full aspect-ratio control and loading options. Inspector labels on this block include “URL to embed”, “Accessible title”, “Aspect ratio”, “Height (px)”.
Is the Embed / iFrame Gutenberg block free?
Yes. Embed / iFrame ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Embed / iFrame 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: Embed URL, Dimensions, Iframe Settings).
Related media blocks
Embed Preview
Privacy-friendly click-to-load embed with a custom thumbnail, CTA overlay, and optional privacy notice.
PDF Embed
Embed a PDF document in an iframe with optional download button and toolbar controls.
Sticky Video
Video player that minimises into a floating corner player when scrolled past, with close and restore controls.
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.
Background Video
A looping autoplay background video section with overlay and InnerBlocks content — distinct from video players or popups.
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.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Embed / iFrame from the Gutenberg inserter.