ic-into-view
v1.2.1
Published
A lightly library for rapid daily development
Downloads
1
Readme
v-into-view
Use this directive to scroll any an element into view.
Install
$ npm i ic-into-view || yarn add ic-into-view
Usage
with no expression:
<div v-into-view>
</div>
with a expression:
<div v-into-view="{ block: 'center' }">
</div>
use it on form element or a component contains form-elements in it:
<input type="text" v-into-view>
Internally, we use native api
scrollIntoView
, so the expression can be an object with these props. The defaults is{behavior: 'auto', block: 'start', inline: 'nearest'}
.