Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
/ react-stickyfill Public archive

React wrapper for Stickyfill library

License

Notifications You must be signed in to change notification settings

seleckis/react-stickyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠ Unmaintained! react-stickyfill did a good job while the browsers were implementing position: sticky support. You can now safely use stickies without a polyfill, all modern browsers support them natively.

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}.

About

React wrapper for Stickyfill library

Resources

License

Stars

Watchers

Forks

Packages

No packages published