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
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
RemoteElementfor 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
elementsoption 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
Related repositories
Similar repositories that may be relevant next.

OrcaReplay: Record and Replay AI Agent Runs
October 2, 2026
OrcaReplay records AI agent runs so developers can inspect what happened, replay interactions offline, and fork a run from a checkpoint onto another model. It is a TypeScript CLI for debugging and comparing agent behavior without modifying the agent.

openmake_llm: Coordinate AI Models, Agents, and Tools
October 1, 2026
OpenMake is a self-hosted AI workspace that coordinates chat models, agents, and tools in one place. It suits people who want multi-step AI workflows with local or open-weight models, while keeping infrastructure and model choices under their control.

zennotes: Manage Markdown Notes with Keyboard-First Tools
October 1, 2026
ZenNotes is a local-first Markdown notes app for people who prefer plain files, keyboard navigation, and Vim motions. It runs as an Electron desktop app or a self-hosted web app, with search, diagrams, CLI, and MCP integrations.

Kun: Local-First AI Agent Workspace
September 27, 2026
Kun is a local-first workspace for using AI agents across coding, writing, design, research, and automation. Its desktop GUI and terminal TUI share one runtime, keeping tasks and approvals connected.