• Stars
    star
    426
  • Rank 101,884 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Synced scroll position across multiple scrollable elements

react-scroll-sync

Synced scroll position across multiple scrollable elements

Demo

http://react-sync-scroll.netlify.com/

Documentation & Example

http://react-sync-scroll.netlify.com/

License

MIT

Installation

npm install --save react-scroll-sync

Usage

import React, {Component} from 'react';
import { ScrollSync, ScrollSyncPane } from 'react-scroll-sync';

export default class MyComponent extends Component {
    
    render() {
      <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>

        );
    }
}

More Repositories

1

lint-staged

๐Ÿšซ๐Ÿ’ฉ โ€” Run linters on git staged files
JavaScript
12,147
star
2

modalbox

Mac OS X style javascript pop-ups for your browser (based on prototype + script.aculo.us)
JavaScript
259
star
3

react-container-dimensions

Wrapper component that detects element resize and passes new dimensions down the tree. Based on https://github.com/wnr/element-resize-detector
JavaScript
230
star
4

webpack-long-term-cache-demo

A demo config showing how to enable long-term caching using Webpack. Read [medium link] for details.
JavaScript
97
star
5

dotfiles

Shell
85
star
6

cooltips

CoolTips is a replacement for conventional web-browser tooltips. Cooltips is fully unobtrusive Class based on Prototype &amp; Script.aculo.us, which is functional without any images (pure CSS).
JavaScript
39
star
7

webpack-codemods

JS Codemod to automatically convert webpack config from v1 to v2
JavaScript
31
star
8

metalsmith-remote-json-to-files

Fetch JSON from remote URLs, transform and inject as files into metalsmith pipeline
JavaScript
8
star
9

codestage

Hassle-free code highlighting for Mac
JavaScript
7
star
10

colorist

Creates a palette from the given image (drag'n'drop)
JavaScript
6
star
11

okonet.github.com

Public pages for okonet.github.com
HTML
4
star
12

metalsmith-webpack-dev-server

Starts webpack dev server when running metalsmith
JavaScript
4
star
13

eslint-config-okonet

ESLint sharable config for my OSS projects
JavaScript
4
star
14

export-albums-to-folders

Action Script for iTunes allowing to copy selected albums to a specified location. It creates the folder structure in the specified directory using the following directory mask: [Artist] - [Album] ([YYYY]). Useful to copy bunch of albums to a different location.
4
star
15

CalendarPad

A Mootools based class for a 3 months date selector.
JavaScript
3
star
16

dialogbox

Mootools & Prototype.js class for unobtrusive facebook-style dialogboxes
JavaScript
3
star
17

ColorSnapperSublime

A Sublime Text 2 plugin for picking colors using ColorSnapper app
Python
3
star
18

YTranslator

A Google Chrome extension which simplifies translation of the selected word with lingvo.yandex.ru.
JavaScript
2
star
19

rework-loader

Loader for webpack which uses Rework (https://github.com/reworkcss/rework) post-processor for CSS
JavaScript
2
star
20

slides

Slides and sources for the talks I made
JavaScript
2
star
21

concertino

TypeScript
2
star
22

js-codemods

A collection of codemods for jscodeshift (https://github.com/facebook/jscodeshift)
JavaScript
1
star
23

colorsnapper-prototype

CoffeeScript
1
star
24

reason-conf-assets

JavaScript
1
star
25

idea-source-root-demo

JavaScript
1
star
26

xiaomi-roborock-token-extractor

Extract Xiaomi Roborock Vacuum token from iOS backup
JavaScript
1
star
27

storybook-reproduction-code-block

TypeScript
1
star
28

yandex.slovari.safariextension

Context menu extension to search for translation on Yandex.Slovari for the selected word.
JavaScript
1
star
29

dynamic-route-api-conflict

JavaScript
1
star
30

raycast-caniuse

A Raycast extension to query "Can I Use" database for browser support
TypeScript
1
star
31

debounced

Presentation slides and examples I did for viennajs meetup
JavaScript
1
star