react-scrolled-in
Detect if an element is scrolled into view. Window or container scrolling. Just a render prop.
Last updated 2 years ago by andytjoslin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-scrolled-in 
SYNC missed versions from official npm registry.

react-scrolled-in Build Status

Detect if an element is scrolled into view. Window or container scrolling. Just a render prop. 4kb.

It just calls a render prop with a visible boolean, nothing more.

import ScrolledIn from 'react-scrolled-in'

ReactDOM.render(
  <SrolledIn
    scrollElement={node => node.parentNode.parentNode}
    render={({ visible }) => <p>{visible ? 'In View!' : 'Out of view'}</p>}
  />,
  document.body
)

More documentation coming soon...

License

MIT © Andrew Joslin

Current Tags

  • 1.0.4                                ...           latest (2 years ago)

6 Versions

  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |