files/en-us/web/api/xrsession/interactionmode/index.md
{{APIRef("WebXR Device API")}}{{SeeCompatTable}}{{SecureContext_Header}}
The {{domxref("XRSession")}} interface's read-only interactionMode property
describes the best space (according to the user agent) for the application to draw an interactive UI for the current session.
A string describing the best space (according to the user agent) for the application to draw an interactive UI for the current session.
Possible values are:
screen-space
world-space
if (xrSession.interactionMode === "world-space") {
// draw UI in the world
} else {
// draw UI directly to the screen
}
{{Specifications}}
{{Compat}}