06.03 · 3D & Advanced
Parallax 3D Tilt
A card tilts toward your pointer, and a light slides over it. Best for cards.
Hover it
Move your pointer over the card, drag a finger across it (or Tab to it and use the arrow keys), or press Show me.
Inside, the card leans toward the cross, your pointer, turning around its middle, and the light sits under it. Dashed: where it lies flat; point at the card, or press Show me.
Stays flat ignores the pointer, shown as a ghost, while Tilts toward you leans toward it and catches the light, like a real card. Point at the right card, or press Show me.
Try it
Change a setting, then try it again or press Show me.
Tilt amount
How far the card leans at its edges.
3D depth
Strong looks closer and more dramatic.
A soft light follows the pointer across the card.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a 3D tilt to [the card you want to bring to life]. As the pointer moves over the card, rotate the card slightly around its horizontal and vertical axes according to where the pointer is, and give its container a 3D perspective so the tilt has depth. When the settings include it, move a soft light across the card with the pointer, as if it catches the light. On touch screens, dragging a finger across the card should tilt it the same way. When the pointer leaves, let the card settle back flat. If the visitor has reduced motion turned on, keep the card flat. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.