Skip to main content
You are viewing Pre-Alpha documentation.
Vuetify0 LogoVuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One

Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Portal

Renderless teleport wrapper with automatic z-index stacking.


RenderlessIntermediateApr 1, 2026

Usage

Portal wraps Vue’s <Teleport> with automatic useStack integration. Content is teleported to body by default and receives a zIndex via slot props for proper overlay ordering.

Basic

Toggle a floating element that teleports to the body on desktop or renders inline on mobile. Uses disabled with useBreakpoints for responsive behavior. Portal registers with the stack and provides zIndex for proper layering.

Mobile — renders inline below

Anatomy

vue
<script setup lang="ts">
  import { Portal } from '@vuetify/v0'
</script>

<template>
  <Portal />
</template>

Architecture

Portal is a thin abstraction over two existing v0 systems:

Portal Flow

Use controls to zoom and pan. Click outside or press Escape to close.

Portal Flow

When mounted, Portal registers a stack ticket. The ticket’s computed zIndex is exposed as a slot prop. When the component unmounts, the ticket is automatically cleaned up via scope disposal.

The disabled prop controls teleporting — when true, content renders inline instead of being teleported. Stack registration is always active regardless of disabled state.

Examples

Stacking

Each Portal registers its own stack ticket. Add multiple layers to see how useStack assigns incrementing zIndex values — each new Portal layers above the previous one. The zIndex slot prop updates reactively as layers are added and removed.

0 active layers

Custom Target

Teleport content into a specific container using the to prop with a CSS selector. Items added in the input panel are rendered inside the target panel via Portal — demonstrating how content can originate in one part of the tree and appear in another.

Input

Items are teleported into the target panel via Portal.

Target

No items yet

Accessibility

Portal is transparent — it adds no DOM elements, ARIA attributes, or keyboard behavior. Accessibility is the responsibility of the content you teleport.

Tip

When teleporting interactive content (modals, menus, notifications), ensure it has proper ARIA roles, keyboard handling, and focus management. Portal handles where content renders, not how it behaves.

Questions

API Reference

The following API details are for all variations of the Portal component.

Portal

Props

to

string | HTMLElement | undefined

Teleport target.

Default: "body"

disabled

boolean | undefined

Render inline instead of teleporting.

Default: false

Slots

default

PortalSlotProps
Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/