All Projects → universal-tilt-js → Universal Tilt.js

universal-tilt-js / Universal Tilt.js

Licence: mit
🎆 Parallax tilt effect library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Universal Tilt.js

Cz Parallax
Simple and tiny jQuery plugin for Parallax effect.
Stars: ✭ 10 (-91.45%)
Mutual labels:  parallax, jquery
Tilt.js
A tiny 60+fps parallax tilt hover effect for jQuery.
Stars: ✭ 3,442 (+2841.88%)
Mutual labels:  parallax, jquery
Parallax background
jQuery parallax background plugin based on GSAP
Stars: ✭ 30 (-74.36%)
Mutual labels:  parallax, jquery
Paroller.js
Parallax scrolling jQuery plugin
Stars: ✭ 535 (+357.26%)
Mutual labels:  parallax, jquery
Simpleparallax.js
Simple and tiny JavaScript library that adds parallax animations on any images
Stars: ✭ 1,075 (+818.8%)
Mutual labels:  parallax, jquery
Footer Reveal
A jQuery plugin for easy implementation of the 'fixed/reveal' footer effect. Demo here:
Stars: ✭ 111 (-5.13%)
Mutual labels:  jquery
Jquery Rwdimagemaps
Responsive Image Maps jQuery Plugin
Stars: ✭ 1,511 (+1191.45%)
Mutual labels:  jquery
Rolly
Custom scroll with inertia, smooth parallax and scenes manager
Stars: ✭ 109 (-6.84%)
Mutual labels:  parallax
Jquery Scrolllock
Locks mouse wheel scroll inside container, preventing it from propagating to parent element
Stars: ✭ 109 (-6.84%)
Mutual labels:  jquery
Goquery
A little like that j-thing, only in Go.
Stars: ✭ 10,931 (+9242.74%)
Mutual labels:  jquery
Multiscroll.js
multiscroll plugin by Alvaro Trigo. Create scrolling split websites. http://alvarotrigo.com/multiScroll/
Stars: ✭ 1,537 (+1213.68%)
Mutual labels:  jquery
Neat
🎈 Neat是一个追求极致优雅,高效,简洁,只为现代浏览器的,jQuery兼容的JavaScript库,只有3.7K(gzip)!
Stars: ✭ 114 (-2.56%)
Mutual labels:  jquery
React Scroll Parallax
🔮 React components to create parallax scroll effects for banners, images or any other DOM elements
Stars: ✭ 1,699 (+1352.14%)
Mutual labels:  parallax
Mobiscroll
Cross platform UI controls for progressive web and hybrid apps (plain JS, jQuery, Angular and React)
Stars: ✭ 1,510 (+1190.6%)
Mutual labels:  jquery
Jeesite4
Java EE 企业级快速开发平台,基于经典技术组合(Spring Boot、Spring MVC、Apache Shiro、MyBatis、Beetl、Bootstrap、AdminLTE),在线代码生成功能,包括核心模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计;界面无刷新,一键换肤;众多账号安全设置,密码策略;在线定时任务配置;支持集群,支持SAAS;支持多数据源
Stars: ✭ 1,563 (+1235.9%)
Mutual labels:  jquery
Simplebox.js
A simple, responsive lightbox plugin.
Stars: ✭ 116 (-0.85%)
Mutual labels:  jquery
Goalprogress
💯 Animated progress bar using jQuery to show how close you are to reaching your goal.
Stars: ✭ 109 (-6.84%)
Mutual labels:  jquery
Nukeviet
NukeViet CMS is multi Content Management System. NukeViet CMS is the 1st open source content management system in Vietnam. NukeViet was awarded the Vietnam Talent 2011, the Ministry of Education and Training Vietnam officially encouraged to use.
Stars: ✭ 113 (-3.42%)
Mutual labels:  jquery
Isonscreen
Simple jQuery plugin to determine if an element is within the viewport
Stars: ✭ 115 (-1.71%)
Mutual labels:  jquery
Clone Section Of Form Es6 Or Jquery
Now on npm. Using vanilla JavaScript (ES6) or jQuery to duplicate a section of a form, maintaining accessibility (a11y).
Stars: ✭ 112 (-4.27%)
Mutual labels:  jquery

universal-tilt.js

NPM version NPM downloads

About

JavaScript & jQuery elements movement library based on:

Tilt.js by Gijs Rogé and vanilla-tilt.js by Șandor Sergiu

universal-tilt.js contains additional functions for mobile devices with gyroscope, new Position Base option and more!

Demo

See plugin in action

React plugin

If you use React, install component with the implementation of the universal-tilt.js library! More here

How to Install

First, install the library in your project by npm:

$ npm install universal-tilt.js

Or Yarn:

$ yarn add universal-tilt.js

You can also connect script via one of CDNs:
bundle.run: https://bundle.run/universal-tilt.js
jsDelivr: https://cdn.jsdelivr.net/npm/universal-tilt.js/
unpkg: https://unpkg.com/universal-tilt.js/

Getting Started

Connect libary with project using script tag in HTML:

<script src="/path/to/universal-tilt.js"></script>

ES6 import:

import UniversalTilt from 'universal-tilt.js';

Or CommonJS:

const UniversalTilt = require('universal-tilt.js');

Next use library with:

• Vanilla JavaScript e.g:

const elems = document.querySelectorAll('.tilt');

const tilt = UniversalTilt.init({
  elements: elems,
  settings: {
    // options...
  },
  callbacks: {
    // callbacks...
  }
});

• or jQuery e.g:

Connect jQuery in HTML

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>

Or include via command line and CommonJS

$ npm install jquery
$ yarn add jquery
$ bower install jquery
const jQuery = require('jquery');

And call plugin on element

$('.tilt').universalTilt({
  settings: {
    // options...
  },
  callbacks: {
    // callbacks...
  }
});

• Plugin supports autoinit

To use it, add data-tilt to html element e.g:

<div data-tilt></div>

Methods

• Destroy method

elems.universalTilt.destroy();

• Get values method

elems.universalTilt.getValues();

• Reset method

elems.universalTilt.reset();

Options

Settings

Name Type Default Description Available options
base string element The surface from which the location of the mouse is captured element or window
disabled string null Disable axis x or y
easing string cubic-bezier(.03, .98, .52, .99) Transition easing cubic-bezier/ease/linear/etc.
exclude RegExp null Disable tilt effect on selected user agents e.g: /(Firefox|iPad)/
max number 35 Max tilt value e.g: 28
perspective number 1000 Tilt effect perspective e.g: 700
reset boolean true Enable/disable element position reset after mouseout true (enable), false (disable)
reverse boolean false Reverse tilt effect directory true (reverse directory), false (standard directory)
scale number 1.0 Element scale on mouseover 0.9/1.3/etc.
shine boolean false Add/remove shine effect on mouseover true (add), false (remove)
shine-opacity1 number 0 Add/remove shine effect on mouseover values >= 0 and <= 1
shine-save1 boolean false Save/reset shine effect on mouseout true (save), false (reset)
speed number 300 Transition speed (ms) e.g: 500

Callbacks

Name Description Available options
onDestroy Callback on plugin destroy el => { /* code */ }
onDeviceMove2 Callback on device move el => { /* code */ }
onInit Callback on plugin init el => { /* code */ }
onMouseEnter Callback on mouse enter el => { /* code */ }
onMouseLeave Callback on mouse leave el => { /* code */ }
onMouseMove Callback on mouse move el => { /* code */ }

1 shine value must be true
2 only for devices supported device motion

Event

tiltChange event will output the x, y & angle of tilting

License

This project is licensed under the MIT License © 2018-present Jakub Biesiada

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].