Skip to content

Commit 82dfef9

Browse files
na2hirokentcdodds
andauthored
doc: Add about horizontal scroll to README (#6)
* Support horizontal scroll * Update src/index.tsx * Add about direction to README.md --------- Co-authored-by: Kent C. Dodds <[email protected]> Co-authored-by: Kent C. Dodds <[email protected]>
1 parent dbe1a7a commit 82dfef9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ And that's it! Now when the user navigates away from the page and then back to
7474
it, the list will be scrolled to the position it was at when the user left the
7575
page.
7676

77+
You can also specify horizontal scroll for elements like carousels:
78+
79+
```tsx
80+
<ElementScrollRestoration elementQuery="#christmas-gifts" direction="horizontal" />
81+
```
7782
## Tips:
7883

7984
1. This requires an inline script, so you'll need to pass a `nonce` if you're

0 commit comments

Comments
 (0)