---
title: 'DeviceMotionEventAcceleration: x'
slug: Web/API/DeviceMotionEventAcceleration/x
tags:
  - API
  - DeviceAcceleration
  - NeedsExample
  - Property
  - Reference
browser-compat: api.DeviceMotionEventAcceleration.x
---
{{ APIRef("Device Orientation Events") }}

## Summary

This read-only property indicates the amount of acceleration that occurred along the X
axis in a [`DeviceMotionEventAcceleration`](/en-US/docs/Web/API/DeviceMotionEventAcceleration)
object.

## Syntax

```js
var xAccel = DeviceMotionEventAcceleration.x;
```

### Return value

- `x`
  - : A `double` indicating the amount of acceleration along the X axis. See [Accelerometer values
    explained](/en-US/docs/Web/API/Detecting_device_orientation) for details.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [`DeviceMotionEventAcceleration.y`](/en-US/docs/Web/API/DeviceMotionEventAcceleration.y)
- [`DeviceMotionEventAcceleration.z`](/en-US/docs/Web/API/DeviceMotionEventAcceleration.z)
