Complex Example

Header
Sidebar

Content

Sidebar
Footer
Sidebar

Content

<header>Header</header>
<div style={{display: "flex", alignItems: "flex-start"}}>
  <StickyBox offsetTop={10} offsetBottom={10}>
    <Sidebar />
  </StickyBox>
  <div>Content</div>
  <StickyBox offsetTop={10} offsetBottom={10} bottom style={{alignSelf: "flex-end"}}>
    <Sidebar />
  </StickyBox>
</div>
<footer>Footer</footer>
<div style={{display: "flex", alignItems: "flex-start"}}>
  <StickyBox offsetTop={20} offsetBottom={20}>
    <Sidebar />
  </StickyBox>
  <div>Content</div>
</div>