Portal

Teleports its children to document.body (or the target given in to); the text below renders outside the preview.

Jump to API reference

Import

Vue
import { UiPortal } from '@ziyarago/ui/vue'

To body

Vue
<UiPortal>
  Rendered in a portal on document.body
</UiPortal>

API reference

Renders its children outside the component tree, for example into document.body.

Props

PropType and valuesDefaultDescription
tostring | HTMLElement—Target element or CSS selector. The adapter default (body) is used when omitted.

Slots

Vue: named slots. React: a prop with the same name; default is children.

defaultContent to teleport.

Notes

  • Renders nothing when the framework adapter provides no portal.