lemonCMS / react-sticky

Simple react component that makes its children stick to the top

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Sticky component

A easy to use component to make somethin stick on the top of your screen

  • React 16 compatible
  • SSR compatible

Demo & docs

https://ultimatejs.babyblox.nl/sticky

Installment

Install with npm

npm install @wicked_query/react-sticky --save

Or with yarn

yarn add @wicked_query/react-sticky

How to use

<Sticky>
  <div>
    Stick to top
  </div>
</Sticky>

Play online

Know issues

  • No margins. The wrapped tag may not have a margin.
  • You can only wrap html tags, no React Components.
  • Does not work on google chrome mobile, but why?

------------------------
Happy coding

About

Simple react component that makes its children stick to the top


Languages

Language:JavaScript 84.4%Language:CSS 13.8%Language:HTML 1.8%