useResizeObserver API
API reference for the useResizeObserver composable.
Functions
useResizeObserver
(target: MaybeRef<Element>, callback: (entries: ResizeObserverEntry[]) => void, options?: ResizeObserverOptions) => UseResizeObserverReturnA composable that uses the Resize Observer API to detect when an element's size changes.
useElementSize
(target: MaybeRef<Element>) => UseElementSizeReturnA convenience composable that uses the Resize Observer API to track an element's size.
Options
Properties
isActive
Readonly<Ref<boolean, boolean>>Whether the observer is currently active (created and observing)