React Tilt
π Easily apply tilt hover effect on React components
Install
npm install react-parallax-tilt
Features
- Lightweight (β3kB), zero dependencies π¦
- Tree-shakable π³ ESM and CommonJS support
- Works with React v15 onwards
- Supports mouse and touch events
- Support for device tilting (gyroscope)
- Glare effect π with custom props (color, position,...) πdemo
- Event tracking for 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', backgroundColor: 'darkgreen' }}>
<h1>
β¦