diff --git a/README.md b/README.md index e62fa40..c6f7653 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,36 @@ -# use-simply-scroll-spy +# use-simple-scroll-spy + Tiny scroll spy react hook that just needs the element ids + +## Installation + +``` +pnpm i use-simply-scroll-spy +``` + +``` +yarn add use-simply-scroll-spy +``` + +``` +npm i use-simply-scroll-spy +``` + +## Usage + +```typescript +const sectionIds = ["section-1", "section-2"]; +const MyComponent: React.FC = () => { + const activeIndex = useSimpleScrollSpy(sectionIds); + return ( + <> +