getIntrinsicSize

Commons
stable

Returns the bounding-box of an element with its right constraint removed and CSS transforms nullified, giving the element's natural (intrinsic) content dimensions. Used by the location/overlay positioning engine.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

el
required
HTMLElement
The overlay or positioned element to measure. Its inline right style is temporarily cleared and CSS transforms are zeroed before measurement.

API

Return value

The value returned by this util.

A DOMRect (or equivalent plain object) with x, y, width, height adjusted to remove the element's own transforms and right-pin offset.

Usage

Examples

Ready-to-paste usage snippets.

Measure natural content dimensions of an overlay

typescript