CSSTransformValue: is2D property

Baseline 2026
Newly available

Since November 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Want more browser support for this feature? Tell us why.

Note: This feature is available in Web Workers.

The is2D read-only property of the CSSTransformValue interface returns whether the transform is 2D or 3D.

is2D is true only if every CSSTransformComponent in the CSSTransformValue is itself 2D (see CSSTransformComponent.is2D), otherwise it is false.

Value

A boolean. true if every object in the value is 2D, otherwise false.

Examples

Comparing 2D and 3D transforms

js
const transform2D = new CSSTransformValue([
  new CSSTranslate(CSS.px(10), CSS.px(20)),
  new CSSScale(2, 3),
]);

console.log(transform2D.is2D); // true

const transform3D = new CSSTransformValue([
  new CSSTranslate(CSS.px(10), CSS.px(20), CSS.px(30)),
  new CSSScale(2, 3),
]);

console.log(transform3D.is2D); // false

Specifications

Specification
CSS Typed OM Level 1
# dom-csstransformvalue-is2d

Browser compatibility

See also