tiltEffect: Pure JavaScript library for 3D perspective card animations with mouse tracking
Key features:
β‘ Vanilla JavaScript with zero dependencies
π¨ Dynamic shine and shadow effects based on cursor position
βοΈ Configurable via HTML data attributes or JS objects
π Hardware-accelerated transforms for 60fps performance
π± Auto-updates on window resize
π― Clean API with updateElementPosition(), reset(), and destroy() methods
π Custom tiltChange events for synchronized animations
Perfect for interactive product cards, portfolio projects, or teaching students web animation fundamentals. The entire implementation spans 200 lines with clear documentation.
π Blog Post
π GitHub Repo
π Live Demo
Top comments (0)