react-stickky

3.9.0 • Public • Published

React-Stickky

Build Status

A simple React sticky component

Live Demo

Description

Wrap any code within and pass css styles

<Sticky>
   <h1>Now I'm sticky</h1>
</Sticky>

and it will be sticky

To make it sticky at the Top of the page

.stickyStyle {
  backgroundColor: '#FFF',
  top: '0'
}

<Sticky className="stickyStyle">
	This is a React component!
</Sticky>

To make it sticky at the Bottom of the page

.stickyStyle {
  backgroundColor: '#FFF',
  bottom: '0'
}

<Sticky className="stickyStyle">
	This is a React component!
</Sticky>

Using other optional properties

<Sticky
     className={style}
     scrollIndex={100}
     stickyWidth="100%"
>
</Sticky>

Propterties are optional

  • className - Any CSS styles needed to pass down to child components
  • scrollIndex - @scrollIndex y=100 the stickyness will apply to the wrapped component
  • stickyWidth - Takes width if passed or defaults to 100%
  • zIndex - Takes a custom zIndex or its set to max

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.9.06latest

Version History

VersionDownloads (Last 7 Days)Published
3.9.06
3.8.02
3.7.02
3.6.02
3.5.02
3.4.02
3.3.02
3.2.02
3.1.02
3.0.33
3.0.23
3.0.12
2.2.02
2.1.22
2.1.02
2.0.01
1.6.01
1.4.01
1.3.01
1.2.01
1.1.11
1.1.01

Package Sidebar

Install

npm i react-stickky

Weekly Downloads

43

Version

3.9.0

License

ISC

Unpacked Size

19.4 kB

Total Files

11

Last publish

Collaborators

  • shyamraj