Tilt Card Glare

3D card with tilt and holographic glare effect that follows the cursor.

Last updated Mar 5, 2026

Component

Holographic Card

Installation

pnpm dlx shadcn@latest add "https://pulkitxm.com/components/tilt-card-glare.json"

Usage

Import

Add the TiltCardGlare import.

import { TiltCardGlare } from "@/components/tilt-card-glare";

Use

Wrap your card content.

<TiltCardGlare>Your content</TiltCardGlare>;

Guidelines

  • Wrap any card-like content. The component handles mouse tracking and transforms.
  • maxTilt: rotation in degrees (default 12).
  • perspective: CSS transform perspective (default 800).
  • glareOpacity: 0–1. glareIntensity: how far the glare moves with cursor.

Props

All props are optional unless marked required. Use these to customize every aspect of the component.

PropTypeDefaultDescription
childrenReact.ReactNodeCard content (e.g. div, Card component).
classNamestringAdditional CSS classes for the wrapper.
glareClassNamestringClasses for the glare overlay.
glareColorstring"rgba(255,255,255,0.8)"Glare center color (CSS color, e.g. rgba(255,255,255,0.8) or amber tint).
maxTiltnumber12Maximum tilt angle in degrees.
perspectivenumber800CSS transform perspective for 3D depth.
glareOpacitynumber0.4Glare overlay opacity (0–1).
glareIntensitynumber50How far the glare moves with cursor (pixels).

Examples

Basic

Wrap your card content for 3D tilt and glare.

Holographic Card
import { TiltCardGlare } from "@/components/tilt-card-glare";

<TiltCardGlare className="h-48 w-72 rounded-2xl bg-linear-to-br from-indigo-600 to-pink-500">
  <div className="flex h-full items-center justify-center p-6">
    <span className="font-bold text-white">
      Holographic Card
    </span>
  </div>
</TiltCardGlare>;

Custom tilt

Increase maxTilt for more dramatic effect.

Holographic Card
import { TiltCardGlare } from "@/components/tilt-card-glare";

<TiltCardGlare
  maxTilt={20}
  className="rounded-xl border p-6"
>
  <p>Card with stronger tilt</p>
</TiltCardGlare>;

Glare customization

Adjust perspective, glare opacity and travel distance.

Holographic Card
import { TiltCardGlare } from "@/components/tilt-card-glare";

<TiltCardGlare
  perspective={1200}
  glareOpacity={0.6}
  glareIntensity={80}
  glareClassName="rounded-2xl"
>
  <div className="p-6">Subtle 3D</div>
</TiltCardGlare>;

Custom gradient & glare

Card gradient via className; glare color via glareColor.

Holographic Card
import { TiltCardGlare } from "@/components/tilt-card-glare";

<TiltCardGlare
  className="h-48 rounded-2xl bg-linear-to-br from-amber-500 to-orange-600"
  glareColor="rgba(255,255,255,0.5)"
>
  <div className="flex h-full items-center justify-center p-6 text-white">
    Warm card
  </div>
</TiltCardGlare>;

Made with ❤️ by Pulkit & Cursor :)

© 2026 Pulkit. All rights reserved

DMCA Verified

Last updated: