diff --git a/README.md b/README.md index ab3b490..b303439 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,15 @@ A lightweight **zero-dependency** React hook + Component that automatically stic - Other libraries use easing functions with durations instead, but these doesn't work well when you want to stream in new content with variable sizing - which is common for AI chatbot use cases. - `scrollToBottom` returns a `Promise` which will resolve to `true` as soon as the scroll was successful, or `false` if the scroll was cancelled. -# Usage +## Installation -## `` Component +```bash +npm install use-stick-to-bottom +``` + +## Usage + +### `` Component ```jsx import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom'; @@ -60,7 +66,7 @@ function ScrollToBottom() { } ``` -## `useStickToBottom` Hook +### `useStickToBottom` Hook ```jsx import { useStickToBottom } from 'use-stick-to-bottom';