Iframe Element
The Iframe element embeds external content in your popup. Use it for forms, widgets, calculators, and any third-party content.
Overview
| Property | Value |
|---|---|
| Element Type | iframe |
| Can Contain Children | No |
| Content Type | External HTML |
Use Cases
- Embedded forms (Typeform, Google Forms, etc.)
- Calendars and scheduling widgets
- Payment forms
- Survey embeds
- Social feeds
- Third-party widgets
- Custom HTML content
Content Settings
Source URL
The URL to embed:
https://forms.example.com/my-form
Common embed sources:
- Typeform
- Google Forms
- Calendly
- HubSpot forms
- MailChimp signup
- Social media feeds
- Custom web pages
Title
Accessibility title for the iframe:
Title: Contact Form
Size Settings
Width
Iframe width:
| Option | Description |
|---|---|
| Full | 100% container width |
| Fixed | Specific pixel width |
| Percentage | Percentage of container |
Height
Iframe height:
Height: 500px
Iframes don't auto-size. Set an appropriate fixed height for your content.
Aspect Ratio
Alternative sizing:
| Ratio | Use Case |
|---|---|
| 16:9 | Videos, wide content |
| 4:3 | Forms |
| 1:1 | Square widgets |
Style Settings
Border
Iframe border:
| Option | Description |
|---|---|
| None | No border (border: none) |
| Solid | Solid border |
| Custom | Custom border style |
Border Radius
Round corners:
Border Radius: 8px
Shadow
Add depth:
Shadow: 0 4px 12px rgba(0,0,0,0.1)
Background Color
Show while loading:
Background: #f8fafc
Iframe Attributes
Scrolling
Control scrollbar visibility:
| Option | Description |
|---|---|
| Auto | Show when needed |
| Yes | Always show |
| No | Never show |
Allow Fullscreen
Enable fullscreen mode:
| Option | Description |
|---|---|
| Enabled | Allow fullscreen |
| Disabled | Prevent fullscreen |
Allow Attributes
Security and feature permissions:
| Attribute | Description |
|---|---|
allow-scripts | Enable JavaScript |
allow-forms | Allow form submission |
allow-popups | Allow popup windows |
allow-same-origin | Same-origin access |
Referrer Policy
Control referrer information:
| Policy | Description |
|---|---|
no-referrer | Don't send referrer |
origin | Send origin only |
strict-origin | Strict origin |
Loading Settings
Lazy Loading
Load when visible:
| Option | Benefit |
|---|---|
| Enabled | Better performance |
| Disabled | Immediate load |
Loading Indicator
Show while iframe loads:
| Option | Description |
|---|---|
| Spinner | Loading spinner |
| Skeleton | Placeholder skeleton |
| None | No indicator |
Layout Settings
Alignment
Position the iframe:
| Option | Description |
|---|---|
| Left | Align to left |
| Center | Center horizontally |
| Right | Align to right |
Margin
Space around the iframe.
Advanced Settings
HTML ID
Custom ID for targeting.
CSS Classes
Add custom classes.
Sandbox
Restrict iframe capabilities for security:
sandbox="allow-scripts allow-forms"
Examples
Contact Form (Typeform)
URL: https://yourname.typeform.com/to/formID
Settings:
- Width: 100%
- Height: 500px
- Border: None
- Border Radius: 0
- Scrolling: No
Calendly Scheduler
URL: https://calendly.com/username/meeting
Settings:
- Width: 100%
- Height: 630px
- Border: None
- Background: #ffffff
Google Form
URL: https://docs.google.com/forms/d/e/.../viewform?embedded=true
Settings:
- Width: 100%
- Height: 800px
- Scrolling: Yes
- Border Radius: 8px
Payment Widget
URL: https://payment-provider.com/embed/...
Settings:
- Width: 100%
- Height: 400px
- Sandbox: allow-scripts allow-forms
- Border Radius: 8px
- Shadow: 0 2px 8px rgba(0,0,0,0.1)
Social Feed
URL: https://widget.example.com/feed/...
Settings:
- Width: 300px
- Height: 400px
- Scrolling: Yes
- Lazy Load: Enabled
Responsive Considerations
Width
- Use 100% width for responsive behavior
- Set max-width if needed
Height
- Consider shorter heights for mobile
- Use device-specific heights:
Desktop: 600px
Tablet: 500px
Mobile: 400px
Hide on Mobile
Some iframes work poorly on mobile. Consider:
- Hiding iframe on mobile
- Showing alternative content (link, button)
Common Issues
Iframe not loading
- Check URL is embeddable
- Verify CORS/X-Frame-Options allow embedding
- Check for HTTPS requirements
Content cut off
- Increase height
- Enable scrolling
- Check content responsive behavior
Security errors
- Add appropriate
allowattributes - Check sandbox settings
- Verify URL protocol (HTTPS)
Slow loading
- Enable lazy loading
- Use loading indicator
- Optimize embedded content
Security Best Practices
- Use HTTPS — Always embed HTTPS URLs
- Sandbox when possible — Restrict iframe capabilities
- Trusted sources only — Only embed content you trust
- Minimal permissions — Only enable needed features
- Review regularly — Check embedded content periodically
Testing Iframes
Before publishing:
- Test on all devices
- Verify form submissions work
- Check loading performance
- Test with slow connections
- Verify accessibility