files/en-us/web/api/xrcompositionlayer/layout/index.md
{{APIRef("WebXR Device API")}}{{SeeCompatTable}}
The read-only layout property of the {{domxref("XRCompositionLayer")}} interface is the layout type of the layer.
To specify the layout type of a layer, use one of the layer creation methods and their layout option:
A string. Possible values:
default
texture-array texture type for default layouts.mono
stereo
texture-array texture type for stereo layouts.stereo-left-right
stereo-top-bottom
To specify a layer's layout, use a layer creation method (like {{domxref("XRWebGLBinding.createQuadLayer()")}}) and its layout option. To retrieve the type of layer layout, use the layout property:
const layer = xrGlBinding.createQuadLayer({
pixelWidth: 1024,
pixelHeight: 768,
layout: "stereo",
});
layer.layout; // "stereo"
{{Specifications}}
{{Compat}}