Sticky Component For Header, Sidebar ...
npm install wil-react-stickySticky Component For Header, Sidebar, Section list, etc.
Useful when a sidebar is too tall or too short compared to the rest of the content.

npm
``bash`
npm install wil-react-sticky --save
yarn
`bash`
yarn add wil-react-sticky
#### 1. Sidebar sticky
#### 3. Section list
#### 4. Header sticky
#### 5. Render Props (demo change background color)
`js
import React from "react";
import Sticky from "wil-react-sticky";
class BasicSticky extends React.Component {
render() {
return (
)
}
`
| Prop | Type | Default | Description |
| :--------- | :-------: | :-----: | :----------- |
| containerSelectorFocus | string | - | Move according to the parent component (value same querySelector vanilla javascript). Example Sidebar sticky |number
| offsetTop | | 0 | Offset from the top of the viewport (in pixels) |number
| zIndex | | 10 | The z-index of the Sticky |Array
| stickyEnableRange | | [0, Infinity] | Sticky working in [min-width, max-width] |ReactNode or (isSticky: boolean) => ReactNode
| children | | - | ReactNode or render props (example render props) |(isSticky: boolean) => void` | - | onChange when position fixed |
| onChange |
MIT © wiloke1