---
title: "A portal element on each host"
description: "portal=\"<id>\" shows an element written once inside the plain box with that id (contract vocab portal; the recipe; LLP 1013.002)."
modificationDate: "2026-11-30"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A portal element on each host

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/reference/developer/a-portal-element-on-each-host: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

`portal="<id>"` shows an element written once inside the plain box with that `id`
(`contract vocab portal`; [the recipe](https://exact.expo.dev/recipes/keep-a-playing-video.md); LLP 1013.002).
Every host keeps the element's state, and its press, pointer-button and key events
bubble through where it is written; hover, focus on the web and the painted hosts'
pan, swipe and long press still follow where it is shown. What each does with the
element itself:

| Host | The element as it moves | A video through the move | Shown nowhere |
|---|---|---|---|
| Web (the JS build) | the same DOM element, by `moveBefore()`, or `insertBefore` where the browser lacks it (WebKit) | plays on, no reload or seek (Chrome, Firefox; WebKit on a bare page); an `iframe` reloads under `insertBefore` | in a connected, `display: none`, inert holder: Chrome pauses a muted autoplay video and resumes it, Firefox keeps it playing |
| Web (the wasm host) | the same DOM element, through the same holder; a reorder within one destination is an `insertBefore`, which reloads an `iframe` | plays on (Chrome) | in the same holder: Chrome pauses and resumes it (other browsers not run) |
| macOS, iOS | the same view, its `AVPlayer` included; a native flight draws it live | plays on | out of the window: the off-screen rule pauses a muted autoplay video and resumes it |
| Android | the same node and player | plays on; Material's container transform draws it in the arriving screen | kept with its player: paused and resumed as on Apple |
| Linux, Windows | the same node | no video decoder: its state and `poster` carry, with no decoded frames; no flights | out of the tree |
| Terminal | laid out where it is shown | no video | out of the tree |

Not yet: a page rendered ahead (`render=build` or `request`) leaves the element out and
builds the page afresh in the browser. On the native hosts a design-token colour inside
the element resolves in its declaration's modes, not its destination's (`color-scheme`
and plain inheritance follow the destination). tvOS and watchOS have not been run;
watchOS has no video. On Android a mover placed in a
box under `display: none` loses its player, which loads again when shown. Windows has
been compiled, not run.
