Get unlimited public & private packages + team-based management with npm Teams.Learn more »

react-stickyfill-fork

0.2.3-fix-scroll-container-11 • Public • Published

react-stickyfill

React wrapper for Stickyfill library

Installation

npm install react-stickyfill --save

Usage

Simple usage:

import React, {Component} from 'react';
import Sticker from 'react-stickyfill';
 
class SomeComponent extend Component{
    render() {
        return (
            <div>{/* Parent Element. */}
                <Sticker>
                    <div>{/* Sticky Element */}</div>
                </Sticker>
            </div>
        );
    }
}

Parent Element should have height greater than Sticky Element. Sticky Element should have style position: sticky and top: {some value}.

Install

npm i react-stickyfill-fork

DownloadsWeekly Downloads

2

Version

0.2.3-fix-scroll-container-11

License

MIT

Unpacked Size

26.7 kB

Total Files

11

Last publish

Collaborators

  • avatar