Skip to content

Adds css classes depending on element visibility within its parent

Notifications You must be signed in to change notification settings

Tolkam-JS-Packages/react-in-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 🤷

About

Adds css classes depending on element visibility within its parent

Resources

Stars

Watchers

Forks

Packages

No packages published