1.2.1 • Published 6 years ago

ic-into-view v1.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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'}.