You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A thin react component wrapper bundled with the fantastic [scroll-into-view-if-needed](https://www.npmjs.com/package/scroll-into-view-if-needed)[ponyfill](https://ponyfill.com).
7
5
8
6
## Install
@@ -39,6 +37,24 @@ The standalone version does **not** come bundled with [scroll-into-view-if-neede
39
37
40
38
`import ScrollIntoViewIfNeeded from 'react-scroll-into-view-if-needed/dist/umd/standalone.js'`
> Full list of options [here](https://www.npmjs.com/package/scroll-into-view-if-needed#api)
47
+
48
+
The `options` prop simply passes options to `scroll-into-view-if-needed`. See all the possible options in their [API documentation](https://www.npmjs.com/package/scroll-into-view-if-needed#api).
49
+
50
+
```js
51
+
<ScrollIntoViewIfNeeded options={{
52
+
scrollMode:'always',
53
+
}}>
54
+
<div>Hello</div>
55
+
</ScrollIntoViewIfNeeded>
56
+
```
57
+
42
58
#### active
43
59
> Type: `boolean`
44
60
> Default: `true`
@@ -71,21 +87,6 @@ class Example extends React.PureComponent {
> Full list of options [here](https://www.npmjs.com/package/scroll-into-view-if-needed#api)
78
-
79
-
The `options` prop simply passes options to `scroll-into-view-if-needed`. See all the possible options in their [API documentation](https://www.npmjs.com/package/scroll-into-view-if-needed#api).
0 commit comments