Frame

Embed external content using iframes

The Frame component embeds external content securely using iframes.

Usage

Code
mdx
1<Frame
2 src="https://example.com/embed"
3 title="Embedded Content"
4 height={400}
5/>

Live Example

Props

PropTypeDefaultDescription
srcstringrequiredURL of the content to embed
titlestring"Embedded content"Accessible title for the iframe
heightnumber | string500Height of the iframe
widthstring"100%"Width of the iframe

Security

Warning
The Frame component uses a sandboxed iframe with limited permissions for security. Allowed features include: `allow-scripts`, `allow-same-origin`, `allow-forms`, and `allow-popups`.

Common Use Cases

  • Embedding maps (Google Maps, OpenStreetMap)
  • Interactive demos and playgrounds
  • Third-party widgets
  • Code sandboxes (CodeSandbox, StackBlitz)

Example: CodeSandbox Embed

Code
mdx
1<Frame
2 src="https://codesandbox.io/embed/new?codemirror=1"
3 title="CodeSandbox"
4 height={500}
5/>