@neshel-ui/animations/scroll
Todas las exportaciones de @neshel-ui/animations/scroll, generadas desde sus declaraciones.
Experimental y no disponible en npm
Firmas, miembros y valores por defecto, generados desde las declaraciones compiladas. Las explicaciones y los ejemplos están en la guía. Efectos ligados al scroll: Scroll y parallax.
Las descripciones de esta referencia se generan desde el código fuente del paquete y se muestran en inglés; las guías y el catálogo están en español.
HorizontalScrollcomponent({ layout, label, trackClassName, className, style, ref, children, onFocus, ...rest }: HorizontalScrollProps): ElementParallaxImagecomponentSP06: a clipping frame (`<div>` or `asChild`) whose first element child (img/video/picture) moves.
({ amount, reducedMotion, asChild, className, ref, children, ...rest }: ParallaxImageProps): ElementRevealOnScrollcomponentST01: plays an Entrance preset when the element enters the viewport (hydrated content is not hidden).
(props: RevealOnScrollProps): ElementScrollEffectcomponentAny scroll-family effect on a `<div>` (or `asChild`); inside a `<ScrollScene>` it follows the scene.
({ preset, options, asChild, conflicts, className, ref, children, ...rest }: ScrollEffectProps): ElementScrollLayercomponentSP01: a depth layer of the nearest `<ScrollScene>` (or of its own viewport range outside a scene).
({ depth, distance, axis, reducedMotion, ...props }: ScrollLayerProps): ElementScrollProgressBarcomponentSP03: decorative reading-progress bar (`aria-hidden`); the browser's scrollbar stays the real control.
({ source, position, driver, className, ref, ...rest }: ScrollProgressBarProps): ElementScrollScenecomponentSP05: 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): ElementStaggerOnScrollcomponentST02: plays the Entrance `stagger` on the children when the container enters the viewport.
(props: RevealOnScrollProps): ElementStickyStackcomponentSP09: 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): ElementcolorAtfunctionColour at progress `p` between stops (stepped when `step`).
(stops: readonly string[], space: string, p: number, step: boolean): stringcoveredScalefunctionScale of a card `index` of `count` at stack progress `p` (equal-slot model, documented).
(index: number, count: number, p: number, scale: number): numbercreateScrollProgressfunction(options?: ScrollProgressOptions | undefined): ScrollProgresscreateScrollTriggerfunction(element: Element, options?: ScrollTriggerOptions | undefined): ScrollTriggercreateSectionSpyfunction(sections: readonly Element[], options?: SectionSpyOptions | undefined): SectionSpygetScrollDebugInfofunctionSnapshot of the scroll engine counters.
(): ScrollDebugInfonativeScrollAvailablefunctionWhether the APIs of the native driver exist (behaviour is checked per animation).
(): booleanobserveInViewfunctionObserve `element` against a trigger area; returns the unobserve function.
(element: Element, input: InViewInput | undefined, listener: Listener): () => voidrefreshScrollfunctionRe-measure every scroll timeline, trigger and effect (for changes the observers cannot see).
(): voidresolveInViewfunctionValidate and normalise a trigger (preset name or options).
(input: InViewInput | undefined, owner?: string | undefined): ResolvedInViewuseInViewfunctionWhether `ref`'s element is inside the trigger area (state changes only on enter/leave).
(ref: RefObject<Element | null>, trigger?: InViewInput | undefined): booleanuseScrollProgressfunctionA 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 | undefineduseScrollScenefunctionThe nearest `<ScrollScene>`'s timeline (`undefined` outside a scene or before it mounted).
(): ScrollProgress | undefineduseScrollTriggerfunctionST04: trigger state of `ref`'s element; callbacks are read from the latest render.
(ref: RefObject<Element | null>, options?: ScrollTriggerOptions | undefined): TriggerStateuseSectionSpyfunctionST08: id of the active section among `ids` (state changes only when the section changes).
(ids: readonly string[], options?: SectionSpyHookOptions | undefined): string | undefineddepthParallaxconstEffectDefinition<DepthParallaxOptions, ResolvedProgress & { extra: { depth: number; distance: number; axis: "x" | "y"; }; }>directionHeaderconstST06 — 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>>imageParallaxconstEffectDefinition<ImageParallaxOptions, ResolvedProgress & { extra: { amount: number; frame: Element | undefined; }; }>inViewPresetsconstST10 — 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; }>; }>inViewProgressconstST05 — `--neshel-view-progress` (0–1) while the element crosses the viewport; `1` under reduced motion.
EffectDefinition<PropertyProgressOptions, ResolvedProgress & { extra: { driver: DriverPreference; }; }>lazyEffectconstReadonly<EffectDefinition<LazyEffectOptions, ResolvedLazy>>pinnedSceneconstSP05: `--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; }; }>revealOnEnterconstST01 — play an Entrance preset when the element enters the trigger area.
Readonly<EffectDefinition<RevealOnEnterOptions, ResolvedReveal>>scrollColorShiftconstEffectDefinition<ScrollColorShiftOptions, ResolvedProgress & { extra: ColorExtra; }>scrollEffectsconstScroll & Parallax definitions in catalogue order (SP01–SP03, SP05–SP09, SP11), for registries.
readonly AnyEffectDefinition[]scrollProgressconstSP03: `--neshel-scroll-progress` (0–1) of the page (or `source`) on the element.
EffectDefinition<PropertyProgressOptions, ResolvedProgress & { extra: { driver: DriverPreference; }; }>scrollTriggerEffectsconstScroll Trigger definitions in catalogue order (ST01, ST02, ST05, ST06, ST07, ST09), for registries.
readonly AnyEffectDefinition[]scrubTransformconstEffectDefinition<ScrubTransformOptions, ResolvedProgress & { extra: { from: Required<ScrubPose>; to: Required<ScrubPose>; easing: Easing; }; }>staggerOnEnterconstST02 — play the E10 `stagger` (children) when the container enters the trigger area.
Readonly<EffectDefinition<RevealOnEnterOptions, ResolvedReveal>>stickyStackconstSP09: 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; }; }>stuckStateconstST07 — `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>>velocitySkewconstReadonly<EffectDefinition<VelocitySkewOptions, ResolvedSkew>>zoomOnScrollconstEffectDefinition<ZoomOnScrollOptions, ResolvedProgress & { extra: { from: number; to: number; easing: Easing; }; }>DepthParallaxOptionsinterfaceDepthParallaxOptions
DepthParallaxOptions Prop Tipo Predeterminado Descripción axis "x" | "y""y"Eje de movimiento (por defecto "y").depth number— Factor de velocidad: positivo va contra el scroll (primer plano), negativo se retrasa (fondo). −5…5, por defecto 1. distance number— Recorrido con profundidad 1 en todo el rango, px (0–2000, por defecto 200). range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.DirectionHeaderOptionsinterfaceDirectionHeaderOptions
DirectionHeaderOptions Prop Tipo Predeterminado Descripción duration number220Duración del deslizamiento en ms (por defecto 220). offset number— Nunca se oculta por encima de esta posición, px (0–2000, por defecto 80). onChange (hidden: boolean) => void— — reducedMotion ReducedMotion— — source Element | Window | null— — tolerance number— Distancia en una dirección antes de cambiar, px (0–400, por defecto 12). HorizontalScrollPropsinterfaceHorizontalScrollProps
HorizontalScrollProps Prop Tipo Predeterminado Descripción children ReactNode— — label string— Accessible name of the region (recommended). layout HorizontalLayout— "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).ref Ref<HTMLElement>— — trackClassName string— — También acepta las props de: React DOM attributes.
ImageParallaxOptionsinterfaceImageParallaxOptions
ImageParallaxOptions Prop Tipo Predeterminado Descripción amount number— Recorrido a cada lado en px (0–400, por defecto 48). El medio se escala para cubrir el marco. frame Element— El marco que recorta (por defecto: el padre del elemento). range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.InViewOptionsinterfaceInViewOptions
InViewOptions Prop Tipo Predeterminado Descripción root Element | null— Raíz de intersección; omitida o null→ la pantalla.rootMargin string— Margen CSS alrededor de la raíz (px o %), como en IntersectionObserver. threshold number | readonly number[]— — InViewReportinterfaceInViewReport
InViewReport Prop Tipo Predeterminado Descripción bottom(obligatoria) number— — inView(obligatoria) boolean— — position(obligatoria) InViewPosition— after: the element left through the start edge (scrolled past).ratio(obligatoria) number— — top(obligatoria) number— Element box edges relative to the viewport at the report (free from the observer entry). LazyEffectOptionsinterfaceLazyEffectOptions
LazyEffectOptions Prop Tipo Predeterminado Descripción keepAlive boolean— Conserva el efecto tras su primera activación (por defecto false: se destruye al alejarse). onActiveChange (active: boolean) => void— — options Record<string, unknown>— — preset(obligatoria) AnyPreset— Cualquier definición o preset (efectos costosos como Tilt3D…). trigger InViewInput"lazy"Área de activación (por defecto "lazy": dos pantallas alrededor).ParallaxImagePropsinterfaceParallaxImageProps
ParallaxImageProps Prop Tipo Predeterminado Descripción amount number48Travel each way, px (default 48). asChild boolean— Apply to the single child element instead of rendering a <div>.children ReactNode— — conflicts ConflictPolicy— Conflict reporting for exclusive channels (default: warn in development). reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — También acepta las props de: React DOM attributes.
ProgressOptionsinterfaceProgressOptions
Options shared by every progress-driven effect.
ProgressOptions Prop Tipo Predeterminado Descripción range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.PropertyProgressOptionsinterfacePropertyProgressOptions
PropertyProgressOptions Prop Tipo Predeterminado Descripción driver DriverPreference— "auto"(por defecto): scroll timeline nativa si está verificada; si no, JS.range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.ResolvedInViewinterfaceResolvedInView
ResolvedInView Prop Tipo Predeterminado Descripción root(obligatoria) Element | null— — rootMargin(obligatoria) string— — threshold(obligatoria) number[]— — RevealOnEnterOptionsinterfaceRevealOnEnterOptions
RevealOnEnterOptions Prop Tipo Predeterminado Descripción initial "hold" | "visible"— "hold"(por defecto al adjuntar de forma imperativa): oculta ya la pose inicial, antes de pintar."visible": conserva el elemento como está hasta el primer aviso (HTML del servidor hidratado).mode TriggerMode— ST03: "once"(por defecto),"repeat"(se rearma en cada salida) o"reverse"(sale al retroceder).onEnter () => void— Callbacks de ST04. onEnterBack () => void— — onLeave () => void— — onLeaveBack () => void— — options Record<string, unknown>— Opciones combinadas sobre las del preset ( appear,hold,replay,playbackse gestionan solas).preset(obligatoria) AnyPreset— Una definición o preset de entrada ( fadeUp,clipCircle…; en ST02 el efectostagger).reducedMotion ReducedMotion— — trigger InViewInput"default"Área de activación: un nombre de inViewPresetso{ rootMargin, threshold, root }(por defecto"default").RevealOnScrollPropsinterfaceRevealOnScrollProps
RevealOnScrollProps Prop Tipo Predeterminado Descripción asChild boolean— Apply to the single child element instead of rendering a <div>.children ReactNode— — conflicts ConflictPolicy— Conflict reporting for exclusive channels (default: warn in development). mode TriggerMode— — onEnter () => void— — onEnterBack () => void— — onLeave () => void— — onLeaveBack () => void— — options Record<string, unknown>— Options merged over the preset's. preset(obligatoria) AnyPreset— Entrance definition or preset ( fadeUp, …); for<StaggerOnScroll>thestaggereffect/preset.reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — trigger InViewInput— — También acepta las props de: React DOM attributes.
ScrollColorShiftOptionsinterfaceScrollColorShiftOptions
ScrollColorShiftOptions Prop Tipo Predeterminado Descripción range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). space "oklab" | "oklch" | "srgb""oklab"Espacio de interpolación de color-mix()(por defecto"oklab").stops(obligatoria) readonly string[]— Dos o más colores CSS (8 como máximo). themeTarget Element— Elemento que recibe data-neshel-theme(por defecto: el propio elemento).themes readonly string[]— Nombres de tema opcionales (uno por parada) escritos en data-neshel-themedethemeTarget.timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.ScrollDebugInfointerfaceScrollDebugInfo
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 Prop Tipo Predeterminado Descripción activeTimelines(obligatoria) 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(obligatoria) number— Geometry measurements (one per timeline per invalidation pass). nativeAnimations(obligatoria) number— Live native (scroll-timeline) animations. nativeFallbacks(obligatoria) number— Native animations replaced by the JS driver after the behavioural check. observedTargets(obligatoria) number— Elements watched by the shared ResizeObserver. scrollReads(obligatoria) number— Scroll position reads (one per source per frame while scrolling). sources(obligatoria) number— Live scroll sources (one per scroller with subscribers). timelines(obligatoria) number— Live timelines ( createScrollProgressresults not destroyed).ScrollDiagnosticsinterfaceScrollDiagnostics
ScrollDiagnostics Prop Tipo Predeterminado Descripción actual(obligatoria) number— Fresh bounding-box subject start (includes transforms). computed(obligatoria) number— Cached subject start (layout, px). drift(obligatoria) number— — ScrollGeometryinterfaceScrollGeometry
ScrollGeometry Prop Tipo Predeterminado Descripción end(obligatoria) number— Scroll offset where progress is 1 (px). max(obligatoria) number— — position(obligatoria) number— — start(obligatoria) number— Scroll offset where progress is 0 (px). subjectSize(obligatoria) number— — subjectStart(obligatoria) number— — viewport(obligatoria) number— — ScrollLayerPropsinterfaceScrollLayerProps
ScrollLayerProps Prop Tipo Predeterminado Descripción asChild boolean— Apply to the single child element instead of rendering a <div>.axis "x" | "y"— — children ReactNode— — conflicts ConflictPolicy— Conflict reporting for exclusive channels (default: warn in development). depth number— SP01 depth (−5…5, default 1). distance number200Travel at depth 1 over the scene, px (default 200). reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — También acepta las props de: React DOM attributes.
ScrollProgressinterfaceScrollProgress
ScrollProgress Prop Tipo Predeterminado Descripción destroy(obligatoria) () => void— Idempotent: releases listeners, observers and frame tasks. diagnose(obligatoria) () => ScrollDiagnostics— Cached vs fresh subject position (forces layout; diagnostics only). direction(obligatoria) 1 | -1 | 0— 1forward,-1backward,0idle.geometry(obligatoria) Readonly<ScrollGeometry>— — get(obligatoria) () => number— Progress 0–1 (smoothed when smoothis on and motion is not reduced).getRaw(obligatoria) () => number— Unsmoothed progress 0–1. getVelocity(obligatoria) () => number— Progress units per second. refresh(obligatoria) () => void— Re-measure this timeline in the next read phase. scrollVelocity(obligatoria) number— Source velocity on this timeline's axis (px/s). subscribe(obligatoria) (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(obligatoria) () => string— — ScrollProgressBarPropsinterfaceScrollProgressBarProps
ScrollProgressBarProps Prop Tipo Predeterminado Descripción driver DriverPreference— — position "top" | "bottom" | "static"— "top"(default, fixed to the viewport top),"bottom"or"static"(in flow).ref Ref<HTMLDivElement>— — source Element | null— Scroll container (default: the page). También acepta las props de: React DOM attributes.
ScrollProgressOptionsinterfaceScrollProgressOptions
ScrollProgressOptions Prop Tipo Predeterminado Descripción axis ScrollAxis— — range readonly [RangeInput, RangeInput]— — reducedMotion ReducedMotion"user"Política de movimiento reducido del suavizado (por defecto "user").smooth boolean | SpringOptions | SpringPreset— SP10: progreso suavizado con resorte ( true= resorte 90/20).source Element | Window | null— Contenedor con scroll; omitido, nullowindow→ el de la página.subject Element | null— Elemento cuyo paso por pantalla se sigue; omítelo para todo el rango de scroll. ScrollScenePropsinterfaceScrollSceneProps
ScrollSceneProps Prop Tipo Predeterminado Descripción children ReactNode— — driver DriverPreference"auto"Native scroll timeline for --neshel-scene-progresswhen verified (default"auto").length number— Section length in viewport heights (1–20, default 3); the stage is pinned for length − 1.range readonly [RangeInput, RangeInput]["contain 0%", "contain 100%"]Progress range (default ["contain 0%", "contain 100%"]: the pinned span).reducedMotion ReducedMotion— — ref Ref<HTMLElement>— — smooth boolean— SP10: spring-smoothed scene progress. stageClassName string— Class of the sticky stage. También acepta las props de: React DOM attributes.
ScrollTriggerinterfaceScrollTrigger
ScrollTrigger Prop Tipo Predeterminado Descripción destroy(obligatoria) () => void— — state(obligatoria) TriggerState— — ScrollTriggerOptionsinterfaceScrollTriggerOptions
ScrollTriggerOptions Prop Tipo Predeterminado Descripción mode TriggerMode"repeat""once"deja de observar tras la primera entrada (por defecto"repeat").onChange (state: TriggerState) => void— — onEnter () => void— antes → activo (al avanzar hacia el área). onEnterBack () => void— después → activo (al retroceder hacia el área). onLeave () => void— activo → después (ya superado). onLeaveBack () => void— activo → antes (al retroceder por encima del inicio del área). trigger InViewInput— — ScrubPoseinterfaceScrubPose
ScrubPose Prop Tipo Predeterminado Descripción opacity number— — rotateZ number— — scale number— — translateX number— — translateY number— — ScrubTransformOptionsinterfaceScrubTransformOptions
ScrubTransformOptions Prop Tipo Predeterminado Descripción easing Easing | EasingPreset— — from ScrubPose— — range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.to ScrubPose— — SectionSpyinterfaceSectionSpy
SectionSpy Prop Tipo Predeterminado Descripción active(obligatoria) number— — destroy(obligatoria) () => void— — refresh(obligatoria) () => void— — SectionSpyHookOptionsinterfaceSectionSpyHookOptions
SectionSpyHookOptions Prop Tipo Predeterminado Descripción line number— Activation line (fraction of the viewport from the top, default 0.3). source Element | null— — SectionSpyOptionsinterfaceSectionSpyOptions
SectionSpyOptions Prop Tipo Predeterminado Descripción axis ScrollAxis— — line number— Línea de activación como fracción de la zona visible desde su inicio (0–1, por defecto 0.3). onChange (index: number, section: Element | undefined) => void— Se llama con el índice activo (-1 antes de la primera sección) y el elemento. source Element | Window | null— — StickyStackOptionsinterfaceStickyStackOptions
StickyStackOptions Prop Tipo Predeterminado Descripción range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scale number— Escala que pierde una tarjeta cubierta por completo (0–0.5, por defecto 0.05; 0 = solo apilado CSS). scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.StickyStackPropsinterfaceStickyStackProps
StickyStackProps Prop Tipo Predeterminado Descripción children ReactNode— — offset string"1.25rem"Offset between stacked cards (CSS length, default "1.25rem").reducedMotion ReducedMotion— — ref Ref<HTMLDivElement>— — scale number— Scale removed from a covered card (default 0.05; 0 = CSS only). top string"1rem"Sticky top of the first card (CSS length, default "1rem").También acepta las props de: React DOM attributes.
StuckStateOptionsinterfaceStuckStateOptions
StuckStateOptions Prop Tipo Predeterminado Descripción onChange (stuck: boolean) => void— — source Element | Window | null— — VelocitySkewOptionsinterfaceVelocitySkewOptions
VelocitySkewOptions Prop Tipo Predeterminado Descripción axis "x" | "y"— — factor number— Grados por px/s (0–0.05, por defecto 0.003). max number— Inclinación máxima en grados (0–30, por defecto 8). reducedMotion ReducedMotion— — source Element | Window | null— — spring SpringOptions— — ZoomOnScrollOptionsinterfaceZoomOnScrollOptions
ZoomOnScrollOptions Prop Tipo Predeterminado Descripción easing Easing | EasingPreset— — from number— Escala con progreso 0 (0.1–5, por defecto 1). range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.to number— Escala con progreso 1 (0.1–5, por defecto 1.2). DriverPreferencetype"auto" | "native" | "js"HorizontalLayouttype"auto" | "pinned" | "stacked" | "scroll"InViewInputtypeInViewPreset | InViewOptionsInViewPositiontype"before" | "inside" | "after"InViewPresettypekeyof typeof inViewPresetsInViewProgressOptionstypeInViewProgressOptions
InViewProgressOptions Prop Tipo Predeterminado Descripción driver DriverPreference— "auto"(por defecto): scroll timeline nativa si está verificada; si no, JS.range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.PinnedSceneOptionstypePinnedSceneOptions
PinnedSceneOptions Prop Tipo Predeterminado Descripción driver DriverPreference— "auto"(por defecto): scroll timeline nativa si está verificada; si no, JS.range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.RangeInputtypeA range edge. With a subject: `"<name>"` or `"<name> <percent>%"`. Without: px (number) or `"<percent>%"` of the maximum scroll.
number | `${number}%` | RangeName | `${RangeName} ${number}%`RangeNametype(typeof RANGE_NAMES)[number]ScrollAxistype"block" | "inline"ScrollEffectPropstypeScrollEffectProps
ScrollEffectProps Prop Tipo Predeterminado Descripción asChild boolean— Apply to the single child element instead of rendering a <div>.children ReactNode— — conflicts ConflictPolicy— Conflict reporting for exclusive channels (default: warn in development). options object— Options of a single preset. preset(obligatoria) AnyPreset | readonly AnyPreset[]— One scroll / scroll-trigger effect or preset, or a list composed on the element. ref Ref<HTMLDivElement>— — También acepta las props de: React DOM attributes.
ScrollProgressEffectOptionstypeScrollProgressEffectOptions
ScrollProgressEffectOptions Prop Tipo Predeterminado Descripción driver DriverPreference— "auto"(por defecto): scroll timeline nativa si está verificada; si no, JS.range readonly [RangeInput, RangeInput]— Rango de la línea de tiempo propia del efecto (se ignora con timeline).reducedMotion ReducedMotion— — scrollAxis ScrollAxis"block"Eje de scroll de la línea de tiempo propia (por defecto "block").smooth boolean | SpringOptions | SpringPreset— Suavizado con resorte (SP10) de la línea de tiempo propia. source Element | Window | null— Contenedor con scroll de la línea de tiempo propia (por defecto: el de la página). timeline ScrollProgress— Una línea de tiempo compartida (p. ej. de useScrollScene()); si no, el efecto crea una.TriggerModetype"once" | "repeat" | "reverse"TriggerStatetype"idle" | "before" | "active" | "after"