# react-sticky-content

> Any dom can be sticky.

Latest version **1.0.2** (published 2018-06-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-sticky-content
pnpm add react-sticky-content
yarn add react-sticky-content
bun add react-sticky-content
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-06-12 |
| First published | 2018-06-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Saorabh Kumar |
| Maintainers | saorabhkr |
| Keywords | react, scroll, sticky, fixed |

## Links

- npm: https://www.npmjs.com/package/react-sticky-content
- Repository: https://github.com/saorabhkr/react-sticky-content
- Homepage: https://github.com/saorabhkr/react-sticky-content#readme
- Issues: https://github.com/saorabhkr/react-sticky-content/issues
- npm.io page: https://npm.io/package/react-sticky-content

## Dependencies (6)

- [to](https://npm.io/package/to.md) ^0.2.9
- [npm](https://npm.io/package/npm.md) ^6.1.0
- [jshint](https://npm.io/package/jshint.md) ^2.9.5
- [update](https://npm.io/package/update.md) ^0.7.4
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.0.0
- [resize-observer-polyfill](https://npm.io/package/resize-observer-polyfill.md) ^1.3.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-06-12
- 1.0.1 — 2018-06-11

## README

# React Sticky Content

## Idea

Fork form (originally developed)
https://github.com/codecks-io/react-sticky-box

With the original package, we can not pass dynamic top offset. With this change a top offset can be passed. Changes made on top of original package.

## See it in action

[codesandbox.io/s/9jyjjn05q4](https://codesandbox.io/s/9jyjjn05q4)

## Installation

`npm install react-sticky-content`

## Usage

```jsx
import StickyBox from "react-sticky-content";

//...

<SomeContainer>
  <StickyBox bottom={false|true} style={{top: "100"}}>
    <div className="sidebar">...sidebar...</div>
  </StickyBox>
  <div className="main">...lots of content...</div>
</SomeContainer>
```

---
_Source: https://npm.io/package/react-sticky-content · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
