Skip to main content
Vuetify0 is now a release candidate!
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

toElement API

Resolves refs, getters, raw DOM elements, or Vue component instances to a single Element | undefined.

Explore these related pages for additional context and usage patterns.

PageCategory
To ElementTransformers
To ArrayTransformers
To ReactiveTransformers

Functions

toElement

(target: MaybeElementRef) => Element | undefined

Resolves a {@link MaybeElementRef} to a DOM Element or undefined. Handles: - Ref<Element>, ShallowRef<HTMLElement>, getter functions - Vue component instances (extracts $el) - Raw DOM elements (pass-through) - null/undefined (returns undefined)

Was this page helpful?

Ctrl+/