Skip to Content
Neshel-UI
Animations (experimental)Reference

@neshel-ui/animations/scroll

Every export of @neshel-ui/animations/scroll, generated from its declarations.

Experimental and not on npm

@neshel-ui/animations is a private package (0.0.0). It cannot be installed, and its API may change before a first publication. These pages document what exists in the repository.

Signatures, members and defaults, generated from the built declarations. For explanations and examples read the guide. Scroll-linked effects: Scroll & Parallax.

  • HorizontalScroll component
    ({ layout, label, trackClassName, className, style, ref, children, onFocus, ...rest }: HorizontalScrollProps): Element
  • ParallaxImage component

    SP06: a clipping frame (`<div>` or `asChild`) whose first element child (img/video/picture) moves.

    ({ amount, reducedMotion, asChild, className, ref, children, ...rest }: ParallaxImageProps): Element
  • RevealOnScroll component

    ST01: plays an Entrance preset when the element enters the viewport (hydrated content is not hidden).

    (props: RevealOnScrollProps): Element
  • ScrollEffect component

    Any scroll-family effect on a `<div>` (or `asChild`); inside a `<ScrollScene>` it follows the scene.

    ({ preset, options, asChild, conflicts, className, ref, children, ...rest }: ScrollEffectProps): Element
  • ScrollLayer component

    SP01: a depth layer of the nearest `<ScrollScene>` (or of its own viewport range outside a scene).

    ({ depth, distance, axis, reducedMotion, ...props }: ScrollLayerProps): Element
  • ScrollProgressBar component

    SP03: decorative reading-progress bar (`aria-hidden`); the browser's scrollbar stays the real control.

    ({ source, position, driver, className, ref, ...rest }: ScrollProgressBarProps): Element
  • ScrollScene component

    SP05: a tall `<section>` whose stage is pinned with CSS `position: sticky` (no JS spacer). Writes `--neshel-scene-progress` (0–1) on the section and shares its timeline with `<ScrollLayer>` and `<ScrollEffect>` children (`useScrollScene()`).

    ({ length, smooth, driver, range, reducedMotion, stageClassName, className, style, ref, children, ...rest }: ScrollSceneProps): Element
  • StaggerOnScroll component

    ST02: plays the Entrance `stagger` on the children when the container enters the viewport.

    (props: RevealOnScrollProps): Element
  • StickyStack component

    SP09: each child is wrapped in a sticky card slot whose index is in the server markup.

    ({ top, offset, scale, reducedMotion, className, style, ref, children, ...rest }: StickyStackProps): Element
  • colorAt function

    Colour at progress `p` between stops (stepped when `step`).

    (stops: readonly string[], space: string, p: number, step: boolean): string
  • coveredScale function

    Scale of a card `index` of `count` at stack progress `p` (equal-slot model, documented).

    (index: number, count: number, p: number, scale: number): number
  • createScrollProgress function
    (options?: ScrollProgressOptions | undefined): ScrollProgress
  • createScrollTrigger function
    (element: Element, options?: ScrollTriggerOptions | undefined): ScrollTrigger
  • createSectionSpy function
    (sections: readonly Element[], options?: SectionSpyOptions | undefined): SectionSpy
  • getScrollDebugInfo function

    Snapshot of the scroll engine counters.

    (): ScrollDebugInfo
  • nativeScrollAvailable function

    Whether the APIs of the native driver exist (behaviour is checked per animation).

    (): boolean
  • observeInView function

    Observe `element` against a trigger area; returns the unobserve function.

    (element: Element, input: InViewInput | undefined, listener: Listener): () => void
  • refreshScroll function

    Re-measure every scroll timeline, trigger and effect (for changes the observers cannot see).

    (): void
  • resolveInView function

    Validate and normalise a trigger (preset name or options).

    (input: InViewInput | undefined, owner?: string | undefined): ResolvedInView
  • useInView function

    Whether `ref`'s element is inside the trigger area (state changes only on enter/leave).

    (ref: RefObject<Element | null>, trigger?: InViewInput | undefined): boolean
  • useScrollProgress function

    A timeline for `ref`'s element (its view range) or, with `ref` omitted/null, for the page. Created after mount (one render); never re-renders per frame — read it in effects or subscribe.

    (ref?: RefObject<Element | null> | null | undefined, options?: Omit<ScrollProgressOptions, "subject"> | undefined): ScrollProgress | undefined
  • useScrollScene function

    The nearest `<ScrollScene>`'s timeline (`undefined` outside a scene or before it mounted).

    (): ScrollProgress | undefined
  • useScrollTrigger function

    ST04: trigger state of `ref`'s element; callbacks are read from the latest render.

    (ref: RefObject<Element | null>, options?: ScrollTriggerOptions | undefined): TriggerState
  • useSectionSpy function

    ST08: id of the active section among `ids` (state changes only when the section changes).

    (ids: readonly string[], options?: SectionSpyHookOptions | undefined): string | undefined
  • depthParallax const
    EffectDefinition<DepthParallaxOptions, ResolvedProgress & { extra: { depth: number; distance: number; axis: "x" | "y"; }; }>
  • directionHeader const

    ST06 — hides a sticky/fixed header (transform layer `translateY(−height)`) while scrolling forward past `offset`; shows it on backward scroll, near the top and while focus is inside it (keyboard users never lose a hidden header). `data-neshel-header="hidden"` while hidden. Height is measured on invalidation.

    Readonly<EffectDefinition<DirectionHeaderOptions, ResolvedHeader>>
  • imageParallax const
    EffectDefinition<ImageParallaxOptions, ResolvedProgress & { extra: { amount: number; frame: Element | undefined; }; }>
  • inViewPresets const

    ST10 — named trigger areas (contracts/api-011.md §1).

    Readonly<{ default: Readonly<{ rootMargin: "0px 0px -10% 0px"; threshold: 0; }>; eager: Readonly<{ rootMargin: "0px 0px 25% 0px"; threshold: 0; }>; lazy: Readonly<{ rootMargin: "200% 0px 200% 0px"; threshold: 0; }>; center: Readonly<{ rootMargin: "-45% 0px -45% 0px"; threshold: 0; }>; half: Readonly<{ rootMargin: "0px"; threshold: 0.5; }>; full: Readonly<{ rootMargin: "0px"; threshold: 0.99; }>; top: Readonly<{ rootMargin: "0px 0px -85% 0px"; threshold: 0; }>; }>
  • inViewProgress const

    ST05 — `--neshel-view-progress` (0–1) while the element crosses the viewport; `1` under reduced motion.

    EffectDefinition<PropertyProgressOptions, ResolvedProgress & { extra: { driver: DriverPreference; }; }>
  • lazyEffect const
    Readonly<EffectDefinition<LazyEffectOptions, ResolvedLazy>>
  • pinnedScene const

    SP05: `--neshel-scene-progress` (0–1) over the pinned span of a tall section (`contain` range: from its top reaching the viewport top to its bottom reaching the viewport bottom). Pinning itself is CSS sticky (`.neshel-scene-stage`). Reduced motion keeps the variable and adds the `scene` token to `data-neshel-fx-reduced` so decor can freeze.

    EffectDefinition<PropertyProgressOptions, ResolvedProgress & { extra: { driver: DriverPreference; }; }>
  • revealOnEnter const

    ST01 — play an Entrance preset when the element enters the trigger area.

    Readonly<EffectDefinition<RevealOnEnterOptions, ResolvedReveal>>
  • scrollColorShift const
    EffectDefinition<ScrollColorShiftOptions, ResolvedProgress & { extra: ColorExtra; }>
  • scrollEffects const

    Scroll & Parallax definitions in catalogue order (SP01–SP03, SP05–SP09, SP11), for registries.

    readonly AnyEffectDefinition[]
  • scrollProgress const

    SP03: `--neshel-scroll-progress` (0–1) of the page (or `source`) on the element.

    EffectDefinition<PropertyProgressOptions, ResolvedProgress & { extra: { driver: DriverPreference; }; }>
  • scrollTriggerEffects const

    Scroll Trigger definitions in catalogue order (ST01, ST02, ST05, ST06, ST07, ST09), for registries.

    readonly AnyEffectDefinition[]
  • scrubTransform const
    EffectDefinition<ScrubTransformOptions, ResolvedProgress & { extra: { from: Required<ScrubPose>; to: Required<ScrubPose>; easing: Easing; }; }>
  • staggerOnEnter const

    ST02 — play the E10 `stagger` (children) when the container enters the trigger area.

    Readonly<EffectDefinition<RevealOnEnterOptions, ResolvedReveal>>
  • stickyStack const

    SP09: attached to a container whose element children are the cards. Each child gets `--neshel-stack-index` (scroll.css offsets its sticky `top`) and, unless `scale: 0`, a covered-card scale layer driven by the container's `contain` progress (exact for equal-height cards). Without JavaScript `<StickyStack>` renders the index inline, so stacking works from the server markup.

    EffectDefinition<StickyStackOptions, ResolvedProgress & { extra: { scale: number; }; }>
  • stuckState const

    ST07 — `data-neshel-stuck` while a `position: sticky` element (block-start offset `top`) is pinned. An IntersectionObserver with `rootMargin: -(top + 1)px 0 0 0` and thresholds 0/1 reports the pinned edge (no sentinel element); the release point (bottom of the containing block) comes from cached geometry and the source position, so scrolling reads no layout.

    Readonly<EffectDefinition<StuckStateOptions, ResolvedStuck>>
  • velocitySkew const
    Readonly<EffectDefinition<VelocitySkewOptions, ResolvedSkew>>
  • zoomOnScroll const
    EffectDefinition<ZoomOnScrollOptions, ResolvedProgress & { extra: { from: number; to: number; easing: Easing; }; }>
  • DepthParallaxOptions interface

    DepthParallaxOptions

    DepthParallaxOptions
    PropTypeDefaultDescription
    axis"x" | "y""y"Movement axis (default "y").
    depthnumber—Speed factor: positive moves against the scroll (foreground), negative lags (background). −5…5, default 1.
    distancenumber—Travel at depth 1 over the whole range, px (0–2000, default 200).
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • DirectionHeaderOptions interface

    DirectionHeaderOptions

    DirectionHeaderOptions
    PropTypeDefaultDescription
    durationnumber220Slide duration in ms (default 220).
    offsetnumber—Never hide above this scroll offset, px (0–2000, default 80).
    onChange(hidden: boolean) => void——
    reducedMotionReducedMotion——
    sourceElement | Window | null——
    tolerancenumber—Scroll distance in one direction before toggling, px (0–400, default 12).
  • HorizontalScrollProps interface

    HorizontalScrollProps

    HorizontalScrollProps
    PropTypeDefaultDescription
    childrenReactNode——
    labelstring—Accessible name of the region (recommended).
    layoutHorizontalLayout—"auto" (default) and "pinned": pinned when the track overflows (else a native scroller), stacked whenever motion is reduced (live). "stacked": always vertical. "scroll": always a native horizontal scroller (user-driven, kept under reduced motion).
    refRef<HTMLElement>——
    trackClassNamestring——

    Also accepts the props of: React DOM attributes.

  • ImageParallaxOptions interface

    ImageParallaxOptions

    ImageParallaxOptions
    PropTypeDefaultDescription
    amountnumber—Travel each way in px (0–400, default 48). The media is scaled to keep the frame covered.
    frameElement—The clipping frame (default: the element's parent).
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • InViewOptions interface

    InViewOptions

    InViewOptions
    PropTypeDefaultDescription
    rootElement | null—Intersection root; omitted or null → the viewport.
    rootMarginstring—CSS margin around the root (px or %), as in IntersectionObserver.
    thresholdnumber | readonly number[]——
  • InViewReport interface

    InViewReport

    InViewReport
    PropTypeDefaultDescription
    bottom(required)number——
    inView(required)boolean——
    position(required)InViewPosition—after: the element left through the start edge (scrolled past).
    ratio(required)number——
    top(required)number—Element box edges relative to the viewport at the report (free from the observer entry).
  • LazyEffectOptions interface

    LazyEffectOptions

    LazyEffectOptions
    PropTypeDefaultDescription
    keepAliveboolean—Keep the effect attached after it first activates (default false: destroy when far).
    onActiveChange(active: boolean) => void——
    optionsRecord<string, unknown>——
    preset(required)AnyPreset—Any effect definition or preset (Tilt3D-like heavy effects, …).
    triggerInViewInput"lazy"Activation area (default "lazy": two viewports around the viewport).
  • ParallaxImageProps interface

    ParallaxImageProps

    ParallaxImageProps
    PropTypeDefaultDescription
    amountnumber48Travel each way, px (default 48).
    asChildboolean—Apply to the single child element instead of rendering a <div>.
    childrenReactNode——
    conflictsConflictPolicy—Conflict reporting for exclusive channels (default: warn in development).
    reducedMotionReducedMotion——
    refRef<HTMLDivElement>——

    Also accepts the props of: React DOM attributes.

  • ProgressOptions interface

    ProgressOptions

    Options shared by every progress-driven effect.

    ProgressOptions
    PropTypeDefaultDescription
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • PropertyProgressOptions interface

    PropertyProgressOptions

    PropertyProgressOptions
    PropTypeDefaultDescription
    driverDriverPreference—"auto" (default): native scroll timeline when verified, else JS.
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • ResolvedInView interface

    ResolvedInView

    ResolvedInView
    PropTypeDefaultDescription
    root(required)Element | null——
    rootMargin(required)string——
    threshold(required)number[]——
  • RevealOnEnterOptions interface

    RevealOnEnterOptions

    RevealOnEnterOptions
    PropTypeDefaultDescription
    initial"hold" | "visible"—"hold" (default for imperative attachment): hide the start pose now, before paint. "visible": keep the element as rendered until the first report (hydrated server markup).
    modeTriggerMode—ST03: "once" (default), "repeat" (re-arm on every leave) or "reverse" (play out on leave-back).
    onEnter() => void—ST04 callbacks.
    onEnterBack() => void——
    onLeave() => void——
    onLeaveBack() => void——
    optionsRecord<string, unknown>—Options merged over the preset's (appear, hold, replay, playback are managed).
    preset(required)AnyPreset—An Entrance definition or preset (fadeUp, clipCircle, …; for ST02 the stagger effect).
    reducedMotionReducedMotion——
    triggerInViewInput"default"Trigger area: an inViewPresets name or { rootMargin, threshold, root } (default "default").
  • RevealOnScrollProps interface

    RevealOnScrollProps

    RevealOnScrollProps
    PropTypeDefaultDescription
    asChildboolean—Apply to the single child element instead of rendering a <div>.
    childrenReactNode——
    conflictsConflictPolicy—Conflict reporting for exclusive channels (default: warn in development).
    modeTriggerMode——
    onEnter() => void——
    onEnterBack() => void——
    onLeave() => void——
    onLeaveBack() => void——
    optionsRecord<string, unknown>—Options merged over the preset's.
    preset(required)AnyPreset—Entrance definition or preset (fadeUp, …); for <StaggerOnScroll> the stagger effect/preset.
    reducedMotionReducedMotion——
    refRef<HTMLDivElement>——
    triggerInViewInput——

    Also accepts the props of: React DOM attributes.

  • ScrollColorShiftOptions interface

    ScrollColorShiftOptions

    ScrollColorShiftOptions
    PropTypeDefaultDescription
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    space"oklab" | "oklch" | "srgb""oklab"Interpolation space of color-mix() (default "oklab").
    stops(required)readonly string[]—Two or more CSS colours (at most 8).
    themeTargetElement—Element receiving data-neshel-theme (default: the element).
    themesreadonly string[]—Optional theme names (one per stop) written to data-neshel-theme on themeTarget.
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • ScrollDebugInfo interface

    ScrollDebugInfo

    Scroll engine counters (contracts/scroll-engine.md §6). Plain numbers, no allocation per frame; tests and the browser lab read them to prove, for example, that scrolling never triggers a geometry measurement.

    ScrollDebugInfo
    PropTypeDefaultDescription
    activeTimelines(required)number—Timelines currently subscribed to their source.
    lastFallback{ native: number | null; expected: number; property: string; }—Last behavioural-check failure: native progress (null = inactive) vs the JS model.
    measurements(required)number—Geometry measurements (one per timeline per invalidation pass).
    nativeAnimations(required)number—Live native (scroll-timeline) animations.
    nativeFallbacks(required)number—Native animations replaced by the JS driver after the behavioural check.
    observedTargets(required)number—Elements watched by the shared ResizeObserver.
    scrollReads(required)number—Scroll position reads (one per source per frame while scrolling).
    sources(required)number—Live scroll sources (one per scroller with subscribers).
    timelines(required)number—Live timelines (createScrollProgress results not destroyed).
  • ScrollDiagnostics interface

    ScrollDiagnostics

    ScrollDiagnostics
    PropTypeDefaultDescription
    actual(required)number—Fresh bounding-box subject start (includes transforms).
    computed(required)number—Cached subject start (layout, px).
    drift(required)number——
  • ScrollGeometry interface

    ScrollGeometry

    ScrollGeometry
    PropTypeDefaultDescription
    end(required)number—Scroll offset where progress is 1 (px).
    max(required)number——
    position(required)number——
    start(required)number—Scroll offset where progress is 0 (px).
    subjectSize(required)number——
    subjectStart(required)number——
    viewport(required)number——
  • ScrollLayerProps interface

    ScrollLayerProps

    ScrollLayerProps
    PropTypeDefaultDescription
    asChildboolean—Apply to the single child element instead of rendering a <div>.
    axis"x" | "y"——
    childrenReactNode——
    conflictsConflictPolicy—Conflict reporting for exclusive channels (default: warn in development).
    depthnumber—SP01 depth (−5…5, default 1).
    distancenumber200Travel at depth 1 over the scene, px (default 200).
    reducedMotionReducedMotion——
    refRef<HTMLDivElement>——

    Also accepts the props of: React DOM attributes.

  • ScrollProgress interface

    ScrollProgress

    ScrollProgress
    PropTypeDefaultDescription
    destroy(required)() => void—Idempotent: releases listeners, observers and frame tasks.
    diagnose(required)() => ScrollDiagnostics—Cached vs fresh subject position (forces layout; diagnostics only).
    direction(required)1 | -1 | 0—1 forward, -1 backward, 0 idle.
    geometry(required)Readonly<ScrollGeometry>——
    get(required)() => number—Progress 0–1 (smoothed when smooth is on and motion is not reduced).
    getRaw(required)() => number—Unsmoothed progress 0–1.
    getVelocity(required)() => number—Progress units per second.
    refresh(required)() => void—Re-measure this timeline in the next read phase.
    scrollVelocity(required)number—Source velocity on this timeline's axis (px/s).
    subscribe(required)(listener: (progress: number) => void) => () => void—Listener after every update (update phase) and every smoothing step, with the current progress (not only on change: a draw at progress 0 matters). The first subscription starts following the source.
    toJSON(required)() => string——
  • ScrollProgressBarProps interface

    ScrollProgressBarProps

    ScrollProgressBarProps
    PropTypeDefaultDescription
    driverDriverPreference——
    position"top" | "bottom" | "static"—"top" (default, fixed to the viewport top), "bottom" or "static" (in flow).
    refRef<HTMLDivElement>——
    sourceElement | null—Scroll container (default: the page).

    Also accepts the props of: React DOM attributes.

  • ScrollProgressOptions interface

    ScrollProgressOptions

    ScrollProgressOptions
    PropTypeDefaultDescription
    axisScrollAxis——
    rangereadonly [RangeInput, RangeInput]——
    reducedMotionReducedMotion"user"Reduced-motion policy for smoothing (default "user").
    smoothboolean | SpringOptions | SpringPreset—SP10: spring-smoothed progress (true = prototype spring 90/20).
    sourceElement | Window | null—Scroll container; omitted, null or window → the root scroller.
    subjectElement | null—Element whose view range is tracked; omit for the source's whole scroll range.
  • ScrollSceneProps interface

    ScrollSceneProps

    ScrollSceneProps
    PropTypeDefaultDescription
    childrenReactNode——
    driverDriverPreference"auto"Native scroll timeline for --neshel-scene-progress when verified (default "auto").
    lengthnumber—Section length in viewport heights (1–20, default 3); the stage is pinned for length − 1.
    rangereadonly [RangeInput, RangeInput]["contain 0%", "contain 100%"]Progress range (default ["contain 0%", "contain 100%"]: the pinned span).
    reducedMotionReducedMotion——
    refRef<HTMLElement>——
    smoothboolean—SP10: spring-smoothed scene progress.
    stageClassNamestring—Class of the sticky stage.

    Also accepts the props of: React DOM attributes.

  • ScrollTrigger interface

    ScrollTrigger

    ScrollTrigger
    PropTypeDefaultDescription
    destroy(required)() => void——
    state(required)TriggerState——
  • ScrollTriggerOptions interface

    ScrollTriggerOptions

    ScrollTriggerOptions
    PropTypeDefaultDescription
    modeTriggerMode"repeat""once" stops observing after the first enter (default "repeat").
    onChange(state: TriggerState) => void——
    onEnter() => void—before → active (scrolling forward into the area).
    onEnterBack() => void—after → active (scrolling back into the area).
    onLeave() => void—active → after (scrolled past).
    onLeaveBack() => void—active → before (scrolled back above the area's start).
    triggerInViewInput——
  • ScrubPose interface

    ScrubPose

    ScrubPose
    PropTypeDefaultDescription
    opacitynumber——
    rotateZnumber——
    scalenumber——
    translateXnumber——
    translateYnumber——
  • ScrubTransformOptions interface

    ScrubTransformOptions

    ScrubTransformOptions
    PropTypeDefaultDescription
    easingEasing | EasingPreset——
    fromScrubPose——
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
    toScrubPose——
  • SectionSpy interface

    SectionSpy

    SectionSpy
    PropTypeDefaultDescription
    active(required)number——
    destroy(required)() => void——
    refresh(required)() => void——
  • SectionSpyHookOptions interface

    SectionSpyHookOptions

    SectionSpyHookOptions
    PropTypeDefaultDescription
    linenumber—Activation line (fraction of the viewport from the top, default 0.3).
    sourceElement | null——
  • SectionSpyOptions interface

    SectionSpyOptions

    SectionSpyOptions
    PropTypeDefaultDescription
    axisScrollAxis——
    linenumber—Activation line as a fraction of the scrollport from its start (0–1, default 0.3).
    onChange(index: number, section: Element | undefined) => void—Called with the active index (-1 before the first section) and element.
    sourceElement | Window | null——
  • StickyStackOptions interface

    StickyStackOptions

    StickyStackOptions
    PropTypeDefaultDescription
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scalenumber—Scale removed from a fully covered card (0–0.5, default 0.05; 0 = CSS-only stacking).
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • StickyStackProps interface

    StickyStackProps

    StickyStackProps
    PropTypeDefaultDescription
    childrenReactNode——
    offsetstring"1.25rem"Offset between stacked cards (CSS length, default "1.25rem").
    reducedMotionReducedMotion——
    refRef<HTMLDivElement>——
    scalenumber—Scale removed from a covered card (default 0.05; 0 = CSS only).
    topstring"1rem"Sticky top of the first card (CSS length, default "1rem").

    Also accepts the props of: React DOM attributes.

  • StuckStateOptions interface

    StuckStateOptions

    StuckStateOptions
    PropTypeDefaultDescription
    onChange(stuck: boolean) => void——
    sourceElement | Window | null——
  • VelocitySkewOptions interface

    VelocitySkewOptions

    VelocitySkewOptions
    PropTypeDefaultDescription
    axis"x" | "y"——
    factornumber—Degrees per px/s (0–0.05, default 0.003).
    maxnumber—Maximum skew in degrees (0–30, default 8).
    reducedMotionReducedMotion——
    sourceElement | Window | null——
    springSpringOptions——
  • ZoomOnScrollOptions interface

    ZoomOnScrollOptions

    ZoomOnScrollOptions
    PropTypeDefaultDescription
    easingEasing | EasingPreset——
    fromnumber—Scale at progress 0 (0.1–5, default 1).
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
    tonumber—Scale at progress 1 (0.1–5, default 1.2).
  • DriverPreference type
    "auto" | "native" | "js"
  • HorizontalLayout type
    "auto" | "pinned" | "stacked" | "scroll"
  • InViewInput type
    InViewPreset | InViewOptions
  • InViewPosition type
    "before" | "inside" | "after"
  • InViewPreset type
    keyof typeof inViewPresets
  • InViewProgressOptions type

    InViewProgressOptions

    InViewProgressOptions
    PropTypeDefaultDescription
    driverDriverPreference—"auto" (default): native scroll timeline when verified, else JS.
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • PinnedSceneOptions type

    PinnedSceneOptions

    PinnedSceneOptions
    PropTypeDefaultDescription
    driverDriverPreference—"auto" (default): native scroll timeline when verified, else JS.
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • RangeInput type

    A range edge. With a subject: `"<name>"` or `"<name> <percent>%"`. Without: px (number) or `"<percent>%"` of the maximum scroll.

    number | `${number}%` | RangeName | `${RangeName} ${number}%`
  • RangeName type
    (typeof RANGE_NAMES)[number]
  • ScrollAxis type
    "block" | "inline"
  • ScrollEffectProps type

    ScrollEffectProps

    ScrollEffectProps
    PropTypeDefaultDescription
    asChildboolean—Apply to the single child element instead of rendering a <div>.
    childrenReactNode——
    conflictsConflictPolicy—Conflict reporting for exclusive channels (default: warn in development).
    optionsobject—Options of a single preset.
    preset(required)AnyPreset | readonly AnyPreset[]—One scroll / scroll-trigger effect or preset, or a list composed on the element.
    refRef<HTMLDivElement>——

    Also accepts the props of: React DOM attributes.

  • ScrollProgressEffectOptions type

    ScrollProgressEffectOptions

    ScrollProgressEffectOptions
    PropTypeDefaultDescription
    driverDriverPreference—"auto" (default): native scroll timeline when verified, else JS.
    rangereadonly [RangeInput, RangeInput]—Range of the effect's own timeline (ignored with timeline).
    reducedMotionReducedMotion——
    scrollAxisScrollAxis"block"Scroll axis of the effect's own timeline (default "block").
    smoothboolean | SpringOptions | SpringPreset—SP10 spring smoothing of the effect's own timeline.
    sourceElement | Window | null—Scroll container of the effect's own timeline (default: the root scroller).
    timelineScrollProgress—A shared timeline (e.g. from useScrollScene()); otherwise the effect creates one.
  • TriggerMode type
    "once" | "repeat" | "reverse"
  • TriggerState type
    "idle" | "before" | "active" | "after"
Edit on GitHub