
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
react-scroll-sync
Advanced tools
Synced scroll position across multiple scrollable elements
https://react-sync-scroll.netlify.app/
https://react-sync-scroll.netlify.app/
If you are upgrading from react-scroll-sync
v0 to v1, please review the Migration Guide.
Version 1.0.0 and above provide built-in TypeScript type definitions, so you must uninstall the community @types/react-scroll-sync
package to avoid type conflicts. The guide includes all required steps to ensure a smooth upgrade.
MIT
npm install --save react-scroll-sync
import { FC } from "react";
import { ScrollSync, ScrollSyncPane } from "react-scroll-sync";
export const MyComponent: FC = () => {
return (
<ScrollSync>
<div style={{ display: "flex", position: "relative", height: 300 }}>
<ScrollSyncPane>
<div style={{ overflow: "auto" }}>
<section style={{ height: 500 }}>
<h1>Left Pane Content</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab
aperiam doloribus dolorum est eum eveniet exercitationem iste
labore minus, neque nobis odit officiis omnis possimus quasi
rerum sed soluta veritatis.
</p>
</section>
</div>
</ScrollSyncPane>
<ScrollSyncPane>
<div style={{ overflow: "auto" }}>
<section style={{ height: 1000 }}>
<h1>Middle Pane Content</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab
aperiam doloribus dolorum est eum eveniet exercitationem iste
labore minus, neque nobis odit officiis omnis possimus quasi
rerum sed soluta veritatis.
</p>
</section>
</div>
</ScrollSyncPane>
<ScrollSyncPane>
<div style={{ overflow: "auto" }}>
<section style={{ height: 2000 }}>
<h1>Right Pane Content</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab
aperiam doloribus dolorum est eum eveniet exercitationem iste
labore minus, neque nobis odit officiis omnis possimus quasi
rerum sed soluta veritatis.
</p>
</section>
</div>
</ScrollSyncPane>
</div>
</ScrollSync>
);
};
FAQs
Synchronize scroll positions across multiple scrollable containers
The npm package react-scroll-sync receives a total of 48,554 weekly downloads. As such, react-scroll-sync popularity was classified as popular.
We found that react-scroll-sync demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.