Shining Card

A 3D mouse-tilt card with a sheen overlay that follows the cursor.

Shining Card tilts in 3D toward the cursor while a soft sheen sweeps across its surface, positioned to follow the pointer in real time. Tilt strength, sheen intensity, and the card radius are props. Built with Framer Motion and Tailwind CSS. A go to treatment for premium feature cards, product showcases, and pricing highlights that should feel physical under the cursor.

Installation

Usage

import { ShiningCard } from "@/components/ui/shining-card";
<div className="relative h-[500px] bg-neutral-100">
  <ShiningCard imageUrl="/img.jpg" title="Hover me" />
</div>

Props

PropTypeDefaultDescription
imageUrlstring—Background image URL for the card.
titlestring—Optional heading overlaid at the top of the card.
tiltStrengthnumber17.5Maximum tilt in degrees (both axes).
shineStrengthnumber0.5Maximum shine overlay opacity (0–1).
shineColorstring#d4d4d8Color of the shine overlay.
imageOverlayOpacitynumber0Opacity of the dark scrim over the image (0–1).
widthnumber320Card width in px.
aspectRatiostring"9/13"CSS aspect ratio for the card.
perspectivenumber1500Perspective in px — bigger = subtler 3D.
classNamestring—Classes for the perspective wrapper.
cardClassNamestring—Classes for the tilted card face.
titleClassNamestring—Classes for the title label.