Tilt 3D

Requires framer-motion
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-tilt-3d

About this component

A Framer Motion button that rotates in 3D perspective as the cursor moves across it, using useMotionValue and useSpring to track mouse position into rotateX/rotateY transforms. A blurred white orb follows the cursor inside the button as a sheen highlight, and a depth shadow expands on hover. Requires framer-motion.

Triggers

  • Hover
  • Mouse tracking
  • 3D

Techniques

  • Mouse tracking
  • preserve-3d

Difficulty

Intermediate

Accessibility

Reduced motion

UseReducedMotion disables all transforms and the sheen orb when prefers-reduced-motion is active.

Use it in anything you build, commercial and client work included. Licence

More buttons

See all
XP GainGet code
HaloGet code