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

Presence

Animation-agnostic mount lifecycle for conditional content.


RenderlessIntermediateApr 1, 2026

Usage

v-if removes elements from the DOM immediately — there’s no way to animate them out. Vue’s <Transition> solves this for CSS transitions, but it’s opinionated about how animation works and doesn’t compose well with headless components.

Presence fills this gap. It keeps content in the DOM during an exit phase, exposes a done() callback you call when your animation finishes, then removes the content. It doesn’t care how you animate — CSS keyframes, Web Animations API, GSAP, or nothing at all.

Basic

Side-by-side comparison of v-if and Presence. The left panel vanishes instantly. The right panel animates out, stays in the DOM during the exit, then unmounts when done() fires. Both use the same boolean — the only difference is how removal works.

v-ifPresence
Vanishes instantly
Animates out, then unmounts

Anatomy

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

<template>
  <Presence />
</template>

Architecture

Presence wraps the usePresence composable, which implements a four-state machine:

Presence State Machine

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

Presence State Machine
Statedata-stateIn DOM?Purpose
unmountedNoContent removed
mountedmountedYesJust entered DOM — target for enter animations
presentpresentYesActive and visible
leavingleavingYesExit animation running, waiting for done()

The mounted state lasts one tick, giving the browser a frame to apply initial styles before transitioning to present. This is the same principle behind requestAnimationFrame-based enter animations.

Examples

Re-Entry

Toggle rapidly during the exit animation. Presence cancels the leave and returns to present without unmounting and remounting — the element stays in the DOM and the exit animation is interrupted cleanly.

Click rapidly — if you toggle during the exit animation, Presence cancels the leave and returns to present. No unmount/remount cycle.

Lazy Mounting

With lazy, content is not mounted until v-model is first true. The event log shows the full mount/unmount lifecycle — notice that nothing happens until the first toggle.

Content mounts once on first toggle, then stays in DOM. Toggle multiple times — mount count stays at 1.
Mounts: 0

Accessibility

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

Tip

Ensure animated content respects prefers-reduced-motion. Presence doesn’t enforce motion preferences — your CSS should handle @media (prefers-reduced-motion: reduce).

Questions

API Reference

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

Presence

Props

lazy

boolean | undefined

Delay first mount until present is first true.

Default: false

immediate

boolean | undefined

Auto-resolve LEAVING state next tick if done() not called.

Default: true

modelValue

boolean | undefined

Default: false

Events

Slots

default

PresenceSlotProps
Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/