# XWUIBackToTop

Floating button to scroll to top

## Basic Usage

XWUIBackToTop Component Floating button to scroll to top.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: XWUIBackToTop Component Floating button to scroll to top.
```

## Custom Threshold

The button stays hidden until the page scrolls past 150px, then appears in the bottom-right corner with a 32px offset.

```example
file: examples/CustomThreshold.ts
html: examples/CustomThreshold.html
title: Custom Threshold
description: The button stays hidden until the page scrolls past 150px, then appears in the bottom-right corner with a 32px offset.
```

## Top-Left Position

An always-visible button pinned to the top-left corner that jumps straight to the top without smooth-scroll animation.

```example
file: examples/TopLeftPosition.ts
html: examples/TopLeftPosition.html
title: Top-Left Position
description: An always-visible button pinned to the top-left corner that jumps straight to the top without smooth-scroll animation.
```

```api
```
