MCPcopy Index your code
hub / github.com/fisshy/react-scroll

github.com/fisshy/react-scroll @v0.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.2 ↗ · + Follow
5 symbols 9 edges 7 files 0 documented · 0% 2 cross-repo links updated 16mo ago★ 4,408191 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

React Scroll

Directive for basic scrolling and smooth scrolling ( work in progress ) Feel free to contribute - everything is appreciated

Install

$ I've not uploaded it to npm yet, I want to finish it first.

Run

$ npm install
$ npm run examples

Examples

Checkout examples

basic

Usage


var React = require('react');
var Scroll = require('react-scroll'); 

var Link = Scroll.Link;
var Element = Scroll.Element;

var Section = React.createClass({
  render: function () {
    return (
        <Link to="test1" smooth={true}>Test 1</Link>
        <Link to="test2" smooth={true}>Test 2</Link>

        <Element name="test1" className="element">
          test 1
        </Element>

        <Element name="test2" className="element">
          test 2
        </Element>
    );
  }
});

React.render(
  <Section />,
  document.getElementById('example')
);

Create your own Link/Element

Simply just include the mixins!

var React = require('react');
var Scroll = require('react-scroll'); 
var Helpers = Scroll.Helpers;

var Element = React.createClass({
  mixins: [Helpers.Element],
  render: function () {
    return (



        {this.props.children}



    );
  }
});

var Link = React.createClass({
  mixins: [Helpers.Scroll],
  render: function () {
    return (
      <a onClick={this.onClick} href="https://github.com/fisshy/react-scroll/raw/v0.0.2/test">
        {this.props.children}
      </a>
    );
  }
});

Todo

  • [x] Vertical scrolling
  • [x] Scroll to element
  • [x] Smooth scroll animation
  • [ ] Live examples
  • [ ] Pass scroll/animation duration as settings
  • [ ] Horizontal scrolling
  • [ ] Spy on scrolling/Highlight
  • [ ] Write test

Core symbols most depended-on inside this repo

currentPositionY
called by 1
modules/mixins/Helpers.js
setDirection
called by 1
modules/mixins/Helpers.js
startAnimateTopScroll
called by 1
modules/mixins/Helpers.js
isDirectory
called by 1
examples/webpack.config.js
animateTopScroll
called by 0
modules/mixins/Helpers.js

Shape

Function 5

Languages

TypeScript100%

Modules by API surface

modules/mixins/Helpers.js4 symbols
examples/webpack.config.js1 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

babel-core4.6.0 · 1×
babel-loader4.0.0 · 1×
gulp3.8.11 · 1×
gulp-concat2.5.2 · 1×
react0.12.2 · 1×
webpack1.6.0 · 1×
webpack-dev-server1.7.0 · 1×

For agents

$ claude mcp add react-scroll \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact