Scroll down for more Info

Installation

NPM

npm install tilted.js

or

CDN

<script src="https://cdn.jsdelivr.net/npm/tilted.js/dist/tilted.js"></script>

Instructions

Add your  HTML  element

<div id='thisIsaID' >this element will be tilted</div>

Add your  CSS 

#thisIsaID {
        background-color: #212121;
        border-radius: 10px;
        padding: 50px;
        display: inline-block;
      }

Run the function  tilted()  with the parameters of  (id of element, properties)

tilted('thisIsaID', {
      intensity: 15,
      onHover: true,
      disableX: false,
      disableY: false,
      invert: false
    });

Code from above, in Action:

this element will be tilted

Properties

intensity: controls the intensity (default: 12)
onHover: controls if tilt happens only on hover (default: false)
disableX: enables/disables tilt on the X axis (default: false)
disableY: enables/disables tilt on the Y axis (default: false)
invert: tilt will be inverted (default: false)