<!-- This file is auto-generated by the docs:generate-viewhelper-docs command. Do not edit directly -->

# ui:portal

**Reference:** [View Source](https://github.com/jramke/fluid-primitives/tree/main/Classes/ViewHelpers/PortalViewHelper.php)

This ViewHelper allows you to render content in a different part of the DOM tree than where it is defined. This is particularly useful for modals, tooltips, or any component that needs to break out of its parent container for styling or positioning reasons.

With the default `name`, portalled content is rendered automatically at the end of `<body>` - no further setup needed. Pass a custom `name` together with a matching [ui:portalContainer](./portalContainer) ViewHelper if you want portalled content to end up somewhere else instead.

## Example
Common use case inside `Tooltip/Content.html`:
```html
<ui:portal>
    <primitives:tooltip.positioner>
        <primitives:tooltip.content>
            <primitives:tooltip.arrow />
            <f:slot />
        </primitives:tooltip.content>
    </primitives:tooltip.positioner>
</ui:portal>
```

## Arguments

| 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 |
