GithubHelp home page GithubHelp logo

jonathandion / react-tilt Goto Github PK

View Code? Open in Web Editor NEW
430.0 430.0 31.0 1.66 MB

Parallax tilt hover effect for React JS ๐Ÿช„

JavaScript 0.97% Nix 13.50% TypeScript 85.53%
3d animation dom javascript paralax react react-tilt tilt

react-tilt's Introduction

react-tilt's People

Contributors

breadadams avatar jonathandion avatar natew avatar philippehenoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-tilt's Issues

Unequal Project Directories

The Dist directory does not equal the current src directory in the master branch.

dist 2 years ago
src 8 months ago

It also does not work correctly when the existing src directory is built. Will you synchronize two directories in a running situation?

Options don't work.

I assume this is abandoned..

But yeah, the options don't work at all. Only the styles do. I get the tilt effect using the basic setup, but any option I change makes no difference to the default ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

Support react 17

The project needs to update its dependencies to also support react 17.
The current code seems to work with react 17, so it should just be a change in the package.json.

Bug with hover and scroll

Google hrome. Demo:

  1. Hover cursor on the element.
  2. Don't move and scroll.
  3. Move cursor by X coordinate -> tilt work fine
  4. Move cursor by Y coordinate -> tilt work wrong

react-tilt-bug

[Bug] Doesn't work in NextJS

I get the following error on fresh install and importing it in a NextJS page:
SyntaxError: Cannot use import statement outside a module

My import code:

import { Tilt } from 'react-tilt';

Environment:
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",

Touch support

Hi, first thanks for creating this nice library for react!
Maybe I'm completely off here but would it be possible to add support for touch gestures, since most of my web apps is not used on computers?

Component throws on unmount

Hi,

very nice tilt component, works very well!
I guess there is a problem while unmounting Tilt. It is possible that some of the delayed executions (via setTimeout/requestAnimationFrame) will be executed after the component is unmounted, which will result in a React warning caused by setState calls.

Something like

Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Tilt component.

I was able to solve this problem by adding some tear down logic:

componentWillUnmount() {
   clearTimeout(this.transitionTimeout);
   cancelAnimationFrame(this.updateCall);
}

Should I prepare a PR?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.