1.0.14 • Published 5 years ago

react-sticky-element-watcher v1.0.14

Weekly downloads
87
License
MIT
Repository
-
Last release
5 years ago

React Sticky Element Watcher

The CSS property position: sticky lacks an :active pseudo-class for applying styles when a element is "stuck".

Installation

npm install react-sticky-element-watcher

Usage

import React from 'React'
import StickyElementWatcher from 'react-sticky-element-watcher'

export default () => (
    <StickyElementWatcher
        render={({ isStuck }) => (
            <nav style={{
                position: 'sticky',
                top: '10px',
                backgroundColor: isStuck ? 'red' : 'white'
            }}>
                Logo: link1, link2
            </nav>
        )}
    />
)
1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago