NVIDIA Elements Patterns Elements Foundations Integrations GitHub System Themes

Iframe

beta:  2.26.2 Coverage: 91.80% Bundle: 10.03kb Lighthouse: 100 Axe Core Released: 0.0.0
Overview API Examples

An iframe component that syncs with the parent document's theme and template content. Use when needing to render dynamically generated or isolated content.

Installation

Iframe

Supplies the iframe with Elements themes, utilities, fonts, and component registrations through its head template. Use this structure because iframe documents do not inherit resources from the parent document.

Dynamic Height

The iframe grows and shrinks with its content. Browsers that support native responsive iframe sizing use frame-sizing: content-height and window.requestResize(). If native sizing is unavailable or the document cannot use it, the component uses resize messages. The component handles both paths without changes to your templates.

Synchronizes the iframe height with expandable content so the host layout avoids empty space or internal scrollbars. Use for previews whose intrinsic height changes after interaction.

Fixed Size

Set --width and --height to keep a fixed viewport with either sizing path.

Overrides intrinsic iframe dimensions with --width and --height to create a stable preview viewport. Use when you need to inspect embedded content at a fixed size regardless of its rendered bounds.

Sandbox

Space-separated native iframe sandbox permissions. The empty default applies all restrictions.Removing the attribute restores the empty default. Changes reload the iframe document.Include allow-scripts for automatic sizing and live theme synchronization.Combining allow-scripts and allow-same-origin permits access to the parent origin.

Sandbox Description string

Use explicit sandbox permissions to enable only the capabilities your content needs.

Complete Document

Complete HTML document rendered without the template wrapper, theme synchronization,or automatic sizing. Set explicit dimensions with --width and --height.Unset this property to restore the head and body templates. An empty string renders a blank document.

Srcdoc Description string

Release Status

All elements and features go through 3 phases of stability, pre-release, beta and stable.

pre-release
Docs Preview API Documentation Fully Themeable
beta
Robust unit test coverages Passed API Review Passed Designer VQA Review Included in library package
stable
No known outstanding AA WCAG issues No known outstanding performance issues Adapts to different screen/container sizes No breaking API changes for at least 90 days
Getting Started Overview Installation CLI MCP Skills Lint What’s New GitHub Patterns Overview Agent Authentication Browse Chat Code Dashboard Editor Empty States Heatmap Keyboard Shortcut Logging Media Navigation Onboarding Panel Responsive Search Subheader Trend Elements Overview Accordion Alert Avatar Badge Breadcrumb Button Button Group Card Chat Message Checkbox Codeblock Color Combobox Copy Button Dashboard Datagrid Getting Started Integrations Column Action Column Alignment Column Fixed Column width Container Card Display Settings Footer Heatmap Keynav Multi Select Pagination Panel Detail Panel Grid Performance Placeholder Row Action Row Groups Row Sort Scroll Height Single Select Stripe Date Datetime Dialog Divider Dot Drag Handle Drawer Dropdown Dropdown Group Dropzone File Format Bytes Datetime Number Relative Time Truncate Forms Getting Started Validation Actions Control Gauge Ghost Icon Icon Button Iframe Input Input Group Joystick List Logo Markdown Markdown CSS Media Controller Pause Button Playback Rate Select Loop Button Mute Button Media PiP Button Seek Button Time Range Volume Range Full-screen Button Menu Month Monaco Input Diff Input Monaco Editor Diff Editor Problems Notification Page Page Header Page Loader Pagination Progressive Filter Chip Progress Bar Progress Dot Progress Ring Password Preferences Input Pulse Radio Range Resize Handle Scroll Box Search Select Skeleton Sort Button Sparkline Star Rating Steps Switch Tabs Tag Text Textarea Time Toast Toggletip Toolbar Tooltip Tree Viewport Viewport Gridlines Minimap Zoom Range Virtual List Week Workspace Foundations Overview Typography Iconography Themes Design Tokens Size & Space Objects Interactions Support Status Color Animation Fonts Layers Custom Layout Horizontal Vertical Grid Popovers i18n Visualization View Transitions DESIGN.md Integrations Getting Started Angular Bundles CDN Custom Elements Eleventy Golang HTMX + Go Hugo Import Maps Lit Lit Library MCP Apps NextJS Nuxt Pi Preact React SolidJS Sphinx Svelte TypeScript Vue About Changelog Metrics Support Accessibility Contributions Requests Migration Sitemap Labs Responsive Layout Viewport Container Patterns Forms Internal API Design Guidelines Properties & Attributes Slots Registration CustomEvents Stateless Composition Styles Packaging Glossary Logs Guidelines Agent Harness Agent Tooling Agent Ownership Documentation Examples TypeScript Testing Unit Testing Accessibility Testing Lighthouse Testing SSR Testing Visual Testing Troubleshooting Component Creation Examples All Examples