# Back to Top

> Pinned floating button that appears once the user has scrolled past `visibilityThreshold` and scrolls to the top on click.

Source: https://ngwr.dev/reference/components/back-top

## Installation

```angular-ts
import { WrBackTop } from 'ngwr/back-top';

@Component({ imports: [WrBackTop] })
export class MyComponent {}
```

## Demo

Scroll down past 400px to reveal the button in the bottom-right corner. The sandbox below provides the scroll runway.

```angular-html
<wr-back-top visibilityThreshold="400" [offset]="80" />
```

## API

| Name | Description | Type | Default |
| --- | --- | --- | --- |
| `visibilityThreshold` | Show the button once `window.scrollY` exceeds this many pixels. | `number` | `400` |
| `offset` | Pixel offset subtracted from the scroll target — for sticky headers. | `number` | `0` |
| `ariaLabel` | Accessible label for the button. Falls back to `backTop.label`, then `'Back to top'`. | `string \| null` | `null` |
