Skip to content

a-portal

This example renders a div with data-portal in the body.

Portal

The a-portal element is used to render elements (its children) in a different location in the DOM. Most frameworks have their own primitives for this. Vue has Teleports, React has createPortal and Solid as well calls it Portal.

Example


<a-portal>
<div>
Content rendered over the page
</div>
</a-portal>