# XWUIAffix

Pin element to viewport when scrolling

## Basic Usage

Pin element to viewport when scrolling.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Pin element to viewport when scrolling.
```

## Offset Top

A toolbar pinned 16px below the top of the viewport once the page scrolls past it.

```example
file: examples/OffsetTop.ts
html: examples/OffsetTop.html
title: Offset Top
description: A toolbar pinned 16px below the top of the viewport once the page scrolls past it.
```

## Bottom Affixed

A call-to-action bar affixed 12px above the bottom of the viewport while content scrolls behind it.

```example
file: examples/BottomAffixed.ts
html: examples/BottomAffixed.html
title: Bottom Affixed
description: A call-to-action bar affixed 12px above the bottom of the viewport while content scrolls behind it.
```

```api
```
