Skip to main content
Vuetify0 is now in alpha!
Vuetify0 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

usePresence API

API reference for the usePresence composable.

Explore these related pages for additional context and usage patterns.

PageCategory
usePresenceSystem
PresencePrimitives
useToggleScopeSystem
useLazySystem

Functions

usePresence

(options: UsePresenceOptions) => UsePresenceReturn

Animation-agnostic mount lifecycle management.

Options

present required

MaybeRefOrGetter<boolean>

Drive visibility.

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

Properties

state

Readonly<ShallowRef<PresenceState>>

Current lifecycle state.

isMounted

Readonly<Ref<boolean, boolean>>

Should the element be in the DOM?

isPresent

Readonly<Ref<boolean, boolean>>

Is it logically present?

isLeaving

Readonly<Ref<boolean, boolean>>

Is an exit in progress?

Methods

done

() => void

Call when exit animation finishes.

Was this page helpful?

Ctrl+/