https://codesandbox.io/s/nameless-worker-z31nt
Added the tilt effect to cards by react-parallax-tilt
mkosir
/
react-parallax-tilt
π Easily apply tilt hover effect on React components - lightweight/zero dependencies (3kB)
React Tilt
Demo π₯
Install
npm install react-parallax-tilt
Features
- Lightweight (β3kB), zero dependencies
π¦ - Works with React v15 onwards
- Supports mouse and touch events
- Support for device tilting (gyroscope)
-
Glare effect
π with custom props (color, position,...)π demo - Events to keep track of component values
π (tilt, glare, mousemove,...)π demo - Many effects that can be easily applied
Example
import React from 'react';
import ReactDOM from 'react-dom';
import Tilt from 'react-parallax-tilt';
const App = () => {
return (
<Tilt>
<div style={{ height: '300px'
β¦![]()
![]()
Koji Kanao | ιε°Ύι«ζ²»@kojikanao_nyc
#reactjs #styledcomponent #card #tiltEffect
(just noticed that TweetDeck doesn't allow users to upload a .mov file)13:20 PM - 06 Aug 2021
https://codesandbox.io/embed/nameless-worker-z31nt?fontsize=14&hidenavigation=1&theme=dark
Top comments (0)