LenisLike interface
The part of Lenis 1.3 the adapter uses.
import type { LenisLike } from '@dioramajs/diorama/lenis'interface LenisLikeMembers
| Name | Type | Description |
|---|---|---|
readonly actualScroll | number | Native scroll position, px. |
readonly animatedScroll | number | Smoothed scroll position, px. |
destroy | () => void | Removes Lenis from the page. |
readonly isHorizontal | boolean | Whether Lenis scrolls horizontally. |
readonly isScrolling | boolean | 'native' | 'smooth' | Whether and how Lenis is scrolling. |
readonly limit | number | Maximum scroll, px. |
readonly options | { autoRaf?: boolean; readonly infinite?: boolean; readonly wrapper?: Window | Element } | Lenis options the adapter reads. |
raf | (time: number) => void | Advances Lenis to |
scrollTo | (...args: never[]) => void | Scrolls to a target. |
time | number | Lenis time, ms. The pump writes it to keep Lenis on the driver's clock. |
on | | Listens to a Lenis event. Returns the unsubscribe function. |
Also exported from @dioramajs/lenis.
Defined in packages/lenis/src/types.ts.