From dbda45f9e168d6be6a0f1214348867794be14501 Mon Sep 17 00:00:00 2001 From: Francisco Moretti Date: Fri, 6 Jun 2025 10:35:17 +0100 Subject: [PATCH] Update README.md Added installation instructions - Updated titles hierarchy --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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';