Skip to main content

Renders its content at the end of <body> instead of where you write it, for a tooltip, a dialog or anything else that has to leave its parent container for styling or positioning.

The content part of a tooltip portals its positioner:

<ui:portal>
    <primitives:tooltip.positioner>
        <primitives:tooltip.content>
            <primitives:tooltip.arrow />
            <f:slot />
        </primitives:tooltip.content>
    </primitives:tooltip.positioner>
</ui:portal>

To render the content somewhere else, give the portal a name and place a matching ui:portalContainer. With disabled="{true}" the content stays in place.

Inside a ui:template the content stays in place too, wrapped in <div data-portal>, and moves to its destination when the client clones the template.

Name Type Description Required Default
name string The name of the target container No 'default'
disabled bool If set to true, the portal functionality is disabled and content is rendered in place No false