Gem 一覧へ戻る
codecks-io/react-sticky-box(新しいタブで開きます)
主要言語: TypeScript
Sticky boxes for contents of all sizes
- star 数
- 503
- watcher 数
- 4
- fork 数
- 47
- issue 数
- 8
- 最終更新
- 2026/04/23
主要言語: TypeScript
Sticky boxes for contents of all sizes
Sticky Boxes with sensible behaviour if the content is bigger than the viewport.
import StickyBox from "react-sticky-box"; const Page = () => ( <div className="row"> <StickyBox offsetTop={20} offsetBottom={20}> <div>Sidebar</div> </StickyBox> <div>Content</div> </div> );
import {useStickyBox} from "react-sticky-box"; const Page = () => { const stickyRef = useStickyBox({offsetTop: 20, offsetBottom: 20}) <div className="row"> <aside ref={stickyRef}> <div>Sidebar</div> </aside> <div>Content</div> </div> };
cd /path/to/repo/packages/docsyarn install && yarn startthis will allow you to modify the react-sticky-box sources in packages/react-sticky-box/src and check the effects in the docs.