Remote DOM: Isolate UI Rendering with Sandboxed JavaScript Environments
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Remote DOM, developed by Shopify, enables rendering DOM elements created in a sandboxed JavaScript environment directly to the main DOM. This allows for isolating potentially untrusted code off the main thread, while still providing a controlled set of UI elements to the main page. It facilitates synchronizing UI between environments like iframes or Web Workers and the top-level page, supporting various JavaScript frameworks for flexible and performant web applications.
Repository Information
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.
Introduction
Remote DOM is a powerful library developed by Shopify that allows developers to render a tree of DOM elements created in a sandboxed JavaScript environment directly to the DOM in a different JavaScript environment. This innovative approach enables the isolation of potentially untrusted code off the main thread, while still allowing it to render a controlled set of UI elements to the main page.
The library is particularly useful for synchronizing elements between a hidden <iframe> and the top-level page, or for leveraging Web Workers to run JavaScript libraries that typically require a top-level HTML page, such as Preact or Svelte. Remote DOM also offers a minimal polyfill of key DOM APIs to facilitate more lightweight sandboxed environments.
Installation
To integrate Remote DOM into your project, you'll need a web project capable of running two JavaScript environments: the "host" environment (main HTML page) and the "remote" environment (sandboxed). The core package, @remote-dom/core, is essential for establishing the connection between these environments.
You can install it using your preferred package manager:
# npm
npm install @remote-dom/core --save
# pnpm
pnpm install @remote-dom/core --save
# yarn
yarn add @remote-dom/core
After installation, you will set up a "receiver" on your host page to process updates from the remote environment and a RemoteMutationObserver in your remote environment to communicate changes back to the host.
Examples
Remote DOM provides several examples to help you get started and understand its capabilities:
- Getting started: Demonstrates the most basic usage, synchronizing text content between a main page and an
<iframe>. - Custom element: Extends the basic example to show how a sandboxed environment can render custom button elements, including handling attributes and events.
- The “kitchen sink”: A comprehensive example showcasing a fully-featured implementation of Remote DOM. This includes custom elements with properties, events, and methods, and the ability to sandbox UI in a web worker. It features implementations in vanilla JavaScript, htm, Preact, React, Svelte, and Vue.
These examples highlight the flexibility of Remote DOM, allowing you to mix and match various host and remote technologies without being tied to a specific JavaScript framework.
Why Use Remote DOM?
Remote DOM offers significant advantages for modern web development:
- UI Isolation: It allows you to run potentially untrusted or complex UI logic in a sandboxed environment, protecting the main thread from performance bottlenecks or security risks.
- Performance: By offloading rendering tasks to Web Workers or iframes, Remote DOM helps keep the main thread free, leading to a smoother and more responsive user experience.
- Framework Agnosticism: The library is designed to work with any JavaScript framework or backend technology, providing a flexible solution for various project setups.
- Controlled UI: Through the use of custom elements and an allowlist approach, you maintain tight control over the visual appearance and functionality of elements rendered from the remote environment.
Links
- GitHub Repository: https://github.com/Shopify/remote-dom
- Core Package Documentation: https://github.com/Shopify/remote-dom/tree/main/packages/core/
- Contributing Guide: https://github.com/Shopify/remote-dom/blob/main/CONTRIBUTING.md
Related repositories
Similar repositories that may be relevant next.

Llama Cloud Services: Knowledge Agents and Management in the Cloud
July 3, 2026
Llama Cloud Services offers tools for building knowledge agents and managing data in the cloud. It provides robust capabilities for parsing various document types, including PDF, DOCX, and PPTX, into structured formats. Users should note that this repository is deprecated, with migration recommended to the new `llama-cloud` packages for continued support and improved performance.

FreeLLMAPI: Stack 16 Free LLM Tiers for 1.7 Billion Tokens/Month
June 27, 2026
FreeLLMAPI is an OpenAI-compatible proxy that aggregates the free tiers of 16 LLM providers, offering access to approximately 1.7 billion tokens per month. It simplifies access to diverse models through a single endpoint, featuring smart routing, automatic failover, and encrypted key storage. This powerful tool is designed for personal experimentation, allowing developers to leverage multiple free LLM resources efficiently.

Voicebox: The Open-Source AI Voice Studio for Cloning and Dictation
June 25, 2026
Voicebox is an innovative open-source AI voice studio that allows users to clone voices, generate speech in multiple languages, and dictate into any application. It provides a comprehensive, local-first voice I/O stack, offering a powerful alternative to cloud-based solutions. This tool ensures complete privacy and control over your voice data, running entirely on your local machine.

EasyWhisperUI: A Cross-Platform Desktop App for Whisper Model Transcription
June 22, 2026
EasyWhisperUI is a fast, local desktop application designed for transcribing audio and video using the Whisper model. It offers GPU acceleration across Windows, macOS, and Linux, providing a user-friendly interface for various transcription tasks. The application supports features like live transcription, batch processing, and translation, making it a versatile tool for media processing.
Source repository
Open the original repository on GitHub.