# SmoothScroll

interface in `@dioramajs/diorama/astro/client`

```ts
import type { SmoothScroll } from '@dioramajs/diorama/astro/client'
```

The part of Lenis 1.3 the page side uses on top of what the adapter needs.

```ts
interface SmoothScroll extends LenisLike
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `actualScroll` | `number` | Native scroll position, px. |
| `animatedScroll` | `number` | Smoothed scroll position, px. |
| `className` | `string` | Lenis' classes for <html>, e.g. 'lenis lenis-stopped'. |
| `destroy` | `() => void` | Removes Lenis from the page. |
| `isHorizontal` | `boolean` | Whether Lenis scrolls horizontally. |
| `isScrolling` | `boolean \| 'native' \| 'smooth'` | Whether and how Lenis is scrolling. |
| `limit` | `number` | Maximum scroll, px. |
| `options` | `{ autoRaf?: boolean; readonly infinite?: boolean; readonly wrapper?: Window \| Element }` | Lenis options the adapter reads. |
| `raf` | `(time: number) => void` | Advances Lenis to `time`, ms. |
| `scrollTo` | `(target: number, options: { force: boolean; immediate: boolean }) => void` | Scrolls to a position. `immediate` ends a smooth scroll in flight, `force` works while stopped. |
| `targetScroll` | `number` | Where a smooth scroll in flight ends, px. |
| `time` | `number` | Lenis time, ms. The pump writes it to keep Lenis on the driver's clock. |
| `on` | `on(event: 'scroll' \| 'virtual-scroll', callback: () => void): () => void` | Listens to a Lenis event. Returns the unsubscribe function. |
| `resize` | `resize(): void` | Measures the page again and takes the native scroll position. |

Defined in [packages/diorama/src/astro-client.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/diorama/src/astro-client.ts#L8).
