AstroLenisOptions interface
Lenis options that can be written into the page.
import type { AstroLenisOptions } from '@dioramajs/diorama/astro'Functions (easing, prevent, virtualScroll) cannot: pass those to smoothScroll from diorama/astro/client in a script.
interface AstroLenisOptionsMembers
| Name | Type | Description |
|---|---|---|
readonly allowNestedScroll? | boolean | Let nested scroll areas scroll natively. Default false. |
readonly anchors? | boolean | { … } | Smooth scroll to |
readonly autoResize? | boolean | Measure the page again when it resizes. Default true. |
readonly autoToggle? | boolean | Stop while <html> has |
readonly duration? | number | Duration of a smooth scroll, s, used instead of |
readonly gestureOrientation? | 'vertical' | 'horizontal' | 'both' | The gestures that scroll. Default the |
readonly infinite? | boolean | Endless scroll. Default false. |
readonly lerp? | number | Smoothing per frame, 0 to 1. Lenis' default 0.1. |
readonly naiveDimensions? | boolean | Measure with scrollHeight on every read. Default false. |
readonly orientation? | 'vertical' | 'horizontal' | The scroll axis. Default 'vertical'. |
readonly overscroll? | boolean | Let a nested Lenis hand the scroll over at its end. Default true. |
readonly respectReducedMotion? | boolean | Under reduced motion follow the input 1:1. Default true. |
readonly smoothWheel? | boolean | Smooth the wheel. Default true. |
readonly stopInertiaOnNavigate? | boolean | Stop the inertia when a link to another page is clicked. Default false. |
readonly syncTouch? | boolean | Smooth touch too, with inertia. Default false. |
readonly syncTouchLerp? | number |
|
readonly touchInertiaExponent? | number | Strength of the |
readonly touchMultiplier? | number | Multiplier of touch moves. Default 1. |
readonly wheelMultiplier? | number | Multiplier of wheel steps. Default 1. |
Defined in packages/diorama/src/astro.ts.