useScrollSync
Synchronizes scroll position across multiple elements.
Synchronizes horizontal scroll positions across multiple elements so they scroll together. Returns a scroll handler to attach to the synchronized elements.
Import#
import { useScrollSync } from '@volue/wave-react';
Example#
API Reference#
Arguments#
Prop | Type | Default |
|---|---|---|
refs* | RefObject<HTMLElement>[] | — |
isDisabled | boolean | false |
Returns#
((event: UIEvent) => void) | undefined — A scroll event handler to attach to the synchronized elements, or undefined if disabled.