GodUI

Tilt Card

A card that tilts in 3D toward the pointer with parallax depth and a specular glare.

Designed in 3D

Move your pointer across the card — it tilts toward you with parallax depth and a specular glare that tracks the cursor.

Hover me

Installation

pnpm dlx shadcn@latest add "https://godui.design/r/tilt-card.json"

The pointer position is normalized over the card and spring-mapped to rotateX and rotateY on a perspective container. The content layer floats toward the viewer by depth for parallax, and a radial glare follows the cursor. It eases back to flat on leave, and renders as a plain static card under prefers-reduced-motion.

Usage

tsx
 
import { TiltCard } from "@/components/godui/tilt-card";
tsx
 
<TiltCard className="w-72 p-6">
  <h3>Title</h3>
  <p>Body copy</p>
</TiltCard>

Stronger tilt and depth

Deeper parallax

Crank maxTilt and depth for a more dramatic effect.

Props

PropTypeDefaultDescription
maxTiltnumber12Maximum tilt in degrees toward the pointer.
scalenumber1.03Hover scale applied to the whole card.
depthnumber40Float the content layer toward the viewer (px).
glarebooleantrueRender a specular glare that follows the pointer.

TiltCard also forwards every standard <div> attribute to the root element.

On this page

Built with GodUI

Beautifully crafted motion components for modern interfaces.

Star on GitHub