---
schema_version: "1"
id: c912f4fd97eafdc1ff5c6ecf61a6c114d553edbd81cbf99b9b3d061fd92c6371
title: UI Embedding
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/lwc/components/lightning/uiEmbedding/lightning-ui-embedding.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-ui-embedding.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bbe4360eabcc927fbc22f9f38118c279af9479b304fcc0f6afe2e7503bc5eb49
products:
  - Lightning Component Reference
---
# UI Embedding

**`lightning-ui-embedding`**

Embeds an external web application in a sandboxed iframe and manages a secure, bidirectional bridge between the host page and the embedded app.

**For Use In**

Lightning Experience

::::::tabset{tabs='["Develop", "Specifications"]'}

:::::tab

`lightning-ui-embedding` creates the iframe, applies the sandbox tokens you specify, and negotiates a bootstrap handshake with the embedded document. After the handshake completes, the host and the embedded app can exchange UI state and
custom events over a `MessageChannel`. Communication uses `postMessage`, so the
embedded document can either use the Salesforce embedding SDK or send the
handshake messages directly.

For more information, see the [Salesforce Microfrontend (UI Embedding) Developer Guide](https://developer.salesforce.com/docs/platform/microfrontend/guide).


:::::

:::::tab
::component-specification{component="uiEmbedding" model="lwc" namespace="lightning"}

:::::

::::::
