GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - okonet/react-scroll-sync: Synced scroll position across multiple scrollable elements

BranchesTags
Open more actions menu

Latest commit

 

History

80 Commits
80 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
.storybook
.storybook
 
 
src
src
 
 
stories
stories
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.lintstagedrc
.lintstagedrc
 
 
.npmignore
.npmignore
 
 
.nvmrc
.nvmrc
 
 
LICENSE
LICENSE
 
 
MIGRATION.md
MIGRATION.md
 
 
README.md
README.md
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.eslint.json
tsconfig.eslint.json
 
 
tsconfig.json
tsconfig.json
 
 
tsup.config.ts
tsup.config.ts
 
 

Repository files navigation

react-scroll-sync

Synced scroll position across multiple scrollable elements

Demo

https://react-sync-scroll.netlify.app/

Documentation & Example

https://react-sync-scroll.netlify.app/

Migration from v0 to v1

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.

License

MIT

Installation

npm install --save react-scroll-sync

Usage

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>
  );
};

About

Synced scroll position across multiple scrollable elements

react-sync-scroll.netlify.app/

Topics

domreactscrollsyncsynchronization

Resources

Readme
MIT license
Activity

Stars

441 stars

Watchers

2 watching

Forks

62 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.