# ScrollbarHelper Service documentation

**Kind:** class

**Provided in:** `root`

```
import { ScrollbarHelper } from '@siemens/element-ng/common';
```

Gets the width of the scrollbar. Nesc for windows [http://stackoverflow.com/a/13382873/888165](<http://stackoverflow.com/a/13382873/888165>)

Deprecated: This service uses a legacy DOM-measurement hack to determine scrollbar width. Use `element.offsetWidth - element.clientWidth` on the scrollable element directly, which is more accurate, SSR-safe, and accounts for OS-level theming and CSS overrides. Will be removed in v52.

```
undecorated_class ScrollbarHelper
```

#### Attributes and Methods

##### width

[Source for width](<https://github.com/siemens/element/blob/main/projects/element-ng/common/services/scrollbar-helper.service.ts#L25-L25>)

**Modifiers:** readonly

**Type:** `number`

**Default:** `this.getWidth()`

The width of the scrollbar.
