---
title: Screen.availWidth
slug: Web/API/Screen/availWidth
tags:
  - API
  - CSSOM View
  - Property
  - Reference
browser-compat: api.Screen.availWidth
---
{{APIRef("CSSOM View")}}

The **`Screen.availWidth`** property returns the amount of
horizontal space (in pixels) available to the window.

## Syntax

```js
var width = window.screen.availWidth
```

## Example

```js
var screenAvailWidth = window.screen.availWidth;

console.log(screenAvailWidth);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
