1.10.0 • Published 4 days ago

@s-ui/react-behavior-sticky v1.10.0

Weekly downloads
65
License
MIT
Repository
-
Last release
4 days ago

BehaviorSticky

This component helps in the implementation of sticky components

Installation

$ npm install @s-ui/react-behavior-sticky --save

Usage

import BehaviorSticky, {
  BehaviorStickyProvider
} from '@s-ui/react-behavior-sticky'

Basic usage (Fixed at top)

  <BehaviorStickyProvider>
    ...
    <BehaviorSticky>
      <HeaderFixed />
    </BehaviorSticky>
    ...
  </BehaviorStickyProvider>

Sticky per container

  <BehaviorStickyProvider>
    ...
    <div ref={container1}>
      <BehaviorSticky container={container1} defaultOffsetTop={45} animate>
        <HeaderWithButtons className={CLASS_DEMO_FIXED_BUTTONS} />
      </BehaviorSticky>
      <Content className={CLASS_DEMO_CONTENT} />
    </div>
    ...
  </BehaviorStickyProvider>

Find full description and more examples in the demo page.

1.10.0

4 days ago

1.9.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

5 years ago