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

useResizeObserver API

API reference for the useResizeObserver composable.

Explore these related pages for additional context and usage patterns.

Functions

useResizeObserver

(target: MaybeElementRef, callback: (entries: ResizeObserverEntry[]) => void, options?: ResizeObserverOptions) => UseResizeObserverReturn

A composable that uses the Resize Observer API to detect when an element's size changes.

useElementSize

(target: MaybeElementRef) => UseElementSizeReturn

A convenience composable that uses the Resize Observer API to track an element's size.

Options

immediate

boolean | undefined

once

boolean | undefined

box

"content-box" | "border-box" | undefined

Properties

isActive

Readonly<Ref<boolean, boolean>>

Whether the observer is currently active (created and observing)

isPaused

Readonly<Ref<boolean, boolean>>

Whether the observer is currently paused

Methods

pause

() => void

Pause observation (disconnects observer but keeps it alive)

resume

() => void

Resume observation

stop

() => void

Stop observation and clean up (destroys observer)

Was this page helpful?

Ctrl+/