R

Teleport

1 parts

Anatomy

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
PropTypeDescription
to?string | HTMLElement | nullTarget DOM node or CSS selector. When `null`/`undefined`, Vue's built-in `<Teleport>` is rendered with its default behavior (body).
defer?booleanDefer teleport rendering until after the parent has mounted. Useful when the target node is rendered by the same component tree.
disabled?booleanDisable teleport — children render in place. SSR-safe default.
forceMount?booleanForcibly keep children mounted even when Teleport is disabled/removed. Opt-in escape hatch for animation-aware primitives.