Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

remedyhealth/react-stickyfill

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-stickyfill

React wrapper for Stickyfill library

Installation

npm install react-stickyfill --save

Usage

Simple usage:

import React from 'react';
import Sticker from 'Stickyfill';

const SomeComponent = React.createClass({
	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

Languages

  • JavaScript 77.6%
  • HTML 22.4%