remote-dom: Synchronize Sandboxed UI with a Host Page

remote-dom: Synchronize Sandboxed UI with a Host Page

Summary

Remote DOM mirrors a UI tree created in a sandboxed JavaScript environment into a host page. It suits teams that need to isolate remote code while limiting which elements and interactions that code can expose.

At a glance

Language
TypeScript
License
MIT
Stars
1.3k
Forks
92
Added to OSRepos
February 15, 2026
Last analyzed
October 3, 2026
View on GitHub

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Overview

Remote DOM synchronizes changes to a DOM-like tree from one JavaScript environment to another, where a host can render them as real elements. This lets applications isolate code in an iframe or Web Worker while still displaying its UI on the main page.

It is intended for applications that need a controlled interface between sandboxed code and host-rendered components. The host can define which custom elements and members remote code is allowed to use, and teams can use different frameworks on either side.

Key Features

  • Sends remote tree mutations to a host through a connection.
  • Provides a DOM receiver that creates and updates elements in the host page.
  • Supports policies that restrict remote elements and their attributes, events, and methods.
  • Offers RemoteElement for declaring which attributes and events a remote custom element communicates.
  • Includes a minimal DOM API polyfill for running remote code in environments such as Web Workers.
  • Provides companion packages for React, Preact, and signals.
  • Demonstrates use with vanilla JavaScript, htm, Preact, React, Svelte, and Vue.

Use Cases

  • Teams embedding third-party or otherwise untrusted UI code: isolate its JavaScript and allow only host-approved elements and interactions.
  • Framework authors or application developers: render a remote framework's UI through custom components implemented by the host.
  • Applications using Web Workers: run UI-producing JavaScript away from the main thread with the included DOM API polyfill.
  • Teams building plugin interfaces: give sandboxed plugins a controlled set of host-rendered UI elements and events.

Project Facts

  • Language: TypeScript
  • License: MIT
  • Stars: 1.3k
  • Forks: 92
  • Topics: none listed
  • Archived: no

Getting Started

Install the core package:

npm install @remote-dom/core

See the repository README and @remote-dom/core documentation for setup details and examples.

Alternatives

  • mcp-ui: mcp-ui connects interactive web interfaces to Model Context Protocol tools and compatible hosts, rather than mirroring a sandboxed UI tree into a host page.

Considerations

  • A project needs both a host environment that renders real elements and a remote environment that produces the synchronized tree.
  • Remote DOM provides the synchronization mechanism, not the host application's custom element implementations or UI design.
  • Configure the host's element policy deliberately. The README notes that omitting the elements option leaves element names unrestricted.
  • Passing function properties between environments may require an additional serialization library, as shown in the examples.

Found this useful?

Share it with someone who would like remote-dom.

Comparisons

Source repository

Open the original repository on GitHub.

18 counted GitHub visits

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️