0.1.4 • Published 5 years ago
directional-hover v0.1.4
Directional Hover Effect
Add a directional css hover effect
Live example here
Installation
$ npm install directional-hover
//or
$ yarn add directional-hoverImporting
import Direction from "directional-hover"Quick use
<div class="thumbs">
<div class="item">
<img src="https://picsum.photos/350/300" />
</div>
</div>import Direction from "directional-hover"
new Direction({
$els: document.querySelectorAll(".item")
})
.itemare the containers. they handle the perspective property. Containers first childs (here.item img) will have the class added for transformation and animation