The inlineSize read-only property of the ResizeObserverSize interface returns the length of the observed element's border box in the inline dimension. For boxes with a horizontal writing-mode, this is the horizontal dimension, or width; if the writing-mode is vertical, this is the vertical dimension, or height.


For more explanation of writing modes and block and inline dimensions, read Handling different text directions.


var inlineSize = ResizeObserverSize.inlineSize;


A decimal representing the inline size in pixels.


In this example we return an array of sizing information with ResizeObserverEntry.contentBoxSize. The inlineSize property returns the inline dimension size of the observed element.

const resizeObserver = new ResizeObserver(entries => {
  for (let entry of entries) {
    let elemSize = entry.contentBoxSize[0];
    console.log(elemSize.inlineSize); // a decimal



Specification Status Comment
Resize Observer
The definition of 'ResizeObserverEntry.inlineSize' in that specification.
Editor's Draft Initial definition.

Browser compatibility

BCD tables only load in the browser