Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 679 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 679 Bytes

tolkam/react-in-view

Adds css classes depending on element visibility within its parent.

Usage

import { render } from 'react-dom';
import InView from '@tolkam/react-in-view';

const scrollingParent = <div className="myScrollingParent">
    <InView>
        <div>Track me and update my classes!</div>
    </InView>
</div>

render(scrollingParent, document.getElementById('app'));

Documentation

The code is rather self-explanatory and API is intended to be as simple as possible. Please, read the sources/Docblock if you have any questions. See Usage and IProps for quick start.

License

Proprietary / Unlicensed 🤷