Tilt Card

Tilt Card: 3D perspective tilt on hover with cursor-tracked glare. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.

Install Tilt Card

npx motion-ui-skill add tilt-card

Components install as source into your project. The interactive page also includes preview, code, documentation and install tabs.

Dependencies

  • clsx
  • motion
  • react
  • tailwind-merge

Source files

Tilt Card

3D perspective tilt on hover with cursor-tracked glare.

Install

npx motion-ui-skill add tilt-card

Dependencies

  • clsx
  • motion
  • react
  • tailwind-merge

Usage

"use client";

import { TiltCard } from "@/components/motion/tilt-card";

export function TiltCardPreview() {
  return (
    <div className="flex items-center justify-center p-6">
      <TiltCard className="w-[280px] border border-border bg-card p-8">
        <div className="text-xs uppercase tracking-wider text-muted-foreground">Premium</div>
        <h3 className="mt-2 text-2xl font-semibold text-foreground">Tilt me</h3>
        <p className="mt-3 text-sm text-muted-foreground">Move your cursor across the card to see 3D tilt + glare.</p>
      </TiltCard>
    </div>
  );
}

API Reference

TiltCard

Prop Type Default Required Description
max number 12 No —
glare boolean true No —
className string — No —

Browse this category