Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

AstroLenisOptions interface

Lenis options that can be written into the page.

View as Markdown
import type { AstroLenisOptions } from '@dioramajs/diorama/astro'

Functions (easing, prevent, virtualScroll) cannot: pass those to smoothScroll from diorama/astro/client in a script.

interface AstroLenisOptions

Members

NameTypeDescription
readonly allowNestedScroll?boolean

Let nested scroll areas scroll natively. Default false.

readonly anchors?boolean | { … }

Smooth scroll to #hash links of the same page, with scroll options if an object.

readonly autoResize?boolean

Measure the page again when it resizes. Default true.

readonly autoToggle?boolean

Stop while <html> has overflow: hidden or clip, start when it scrolls again.

readonly duration?number

Duration of a smooth scroll, s, used instead of lerp.

readonly gestureOrientation?'vertical' | 'horizontal' | 'both'

The gestures that scroll. Default the orientation, 'both' for horizontal.

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

lerp while syncTouch follows a finger. Default 0.075.

readonly touchInertiaExponent?number

Strength of the syncTouch inertia. Default 1.7.

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.