Introducing Motion-Primitives Pro - Advanced components and templates to help you build a website that stands out.

Tilt

3D tilt effect that responds to mouse movement, enhancing UI elements with a dynamic depth effect, customizable rotation factors and spring options.

Examples

Basic Tilt Card

Ghost in the shell - Kôkaku kidôtai

Ghost in the Shell

Kôkaku kidôtai

Tilt with Spotlight

Example of the Spotlight component used with the Tilt component.

Ghost in the shell - Kôkaku kidôtai

2001: A Space Odyssey

Stanley Kubrick

Installation

npx shadcn add "https://motion-primitives.com/c/tilt.json"

Component API

Border Trail

PropTypeDefaultDescription
classNamestringAdditional CSS classes for styling the tilt.
styleMotionStyleAdditional CSS classes for styling the tilt.
rotationFactornumber15Controls the maximum rotation angle in degrees.
isRevesebooleanfalseReverses the tilt effect's rotation direction.
springOptionsSpringOptionsSpring options for the tilt effect.

Credits

Initiated by @AFPedreros