◇
Teleport
1 partsAnatomy
Import the parts and compose them. Each part forwards attributes to its underlying element.
vue
import {
Teleport,
} from '@robonen/primitives/teleport';
<Teleport />API Reference
Teleport
Root| Prop | Type | Description |
|---|---|---|
to? | string | HTMLElement | null | Target DOM node or CSS selector. When `null`/`undefined`, Vue's built-in `<Teleport>` is rendered with its default behavior (body). |
defer? | boolean | Defer teleport rendering until after the parent has mounted. Useful when the target node is rendered by the same component tree. |
disabled? | boolean | Disable teleport — children render in place. SSR-safe default. |
forceMount? | boolean | Forcibly keep children mounted even when Teleport is disabled/removed. Opt-in escape hatch for animation-aware primitives. |