---
title: DeviceOrientationEvent.alpha
slug: Web/API/DeviceOrientationEvent/alpha
tags:
  - API
  - DeviceOrientation API
  - NeedsBetterSpecLink
  - NeedsExample
  - NeedsMarkupWork
  - Property
  - Reference
browser-compat: api.DeviceOrientationEvent.alpha
---
{{ ApiRef("Device Orientation Events") }}

Returns the rotation of the device around the Z axis; that is, the number of degrees by
which the device is being twisted around the center of the screen. See [Orientation and motion data
explained](/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained) for details.

## Syntax

```js
var alpha = instanceOfDeviceOrientationEvent.alpha;
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{ domxref("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Detecting_device_orientation)
- [Orientation and motion data
  explained](/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained)
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{ event("deviceorientation") }}
