3D Tilt Card

Overview

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

This card component is intended for interfaces that need a 3D card that tilts toward the pointer with parallax depth and glare, SaaS dashboards, and product pages. Its implementation is provided as editable source so the final behavior and styling stay inside your project.

Technologies

React
TypeScript
Tailwind CSS
Motion
Next.js

Detected package dependencies: framer-motion.

@spectrumui/tilt-card
Aurora Headphones
Studio sound with adaptive noise cancellation.
Aurora Headphones product shot
$249

Move the pointer across the card — layers lift at different depths

Installation

Login to view commandCreate a free account to access the install command

Usage

import { TiltCard, TiltCardItem } from "@/components/spectrumui/tilt-card"
<TiltCard className="max-w-sm p-6">
  <TiltCardItem depth={60}>Floats above the card</TiltCardItem>
  <TiltCardItem depth={30}>Floats a little less</TiltCardItem>
</TiltCard>

API Reference

TiltCard

The perspective container and card surface. Wrap any content; use TiltCardItem for pieces that should lift toward the viewer while hovered.

PropTypeDefaultDescription
maxTiltnumber12Maximum rotation toward the pointer in degrees
tiltReversebooleanfalseInvert the tilt so the card leans away from the pointer
scalenumber1.02Scale applied to the card while hovered
perspectivenumber1000CSS perspective distance in pixels
glarebooleantrueShow the pointer-following glare highlight
glareColorstring"rgba(255, 255, 255, 0.35)"Color at the center of the glare gradient
containerClassNamestring-Classes for the outer perspective wrapper
classNamestring-Additional classes merged with the card surface styles

TiltCardItem

A depth layer inside the card. While the card is hovered it translates on the Z axis by depth pixels, creating the parallax pop-out effect.

PropTypeDefaultDescription
depthnumber0Lift toward the viewer in pixels while the card is hovered
classNamestring-Additional classes for the layer element

Examples

Custom Tilt and Glare

Aggressive tilt
maxTilt 20° with a sky glare
Subtle tilt
maxTilt 8° with no glare

Use cases

  • interfaces that need a 3D card that tilts toward the pointer with parallax depth and glare
  • SaaS dashboards
  • product pages

Features

  • Copy-paste source that remains in your repository
  • TypeScript source included with the component
  • Tailwind CSS classes editable in the component source
  • Animation implemented with Motion
  • Reduced-motion handling present in the source

Accessibility

  • The source includes ARIA attributes or roles; preserve them when customizing the component.
  • The source checks reduced-motion preferences or includes motion-reduce styles.
  • Test focus order, keyboard operation, labels, contrast, and screen-reader output in the final application context.

Customization

  • Edit the Tailwind utility classes in the copied source to match your spacing, color, and typography tokens.
  • Use the documented className surface for local layout adjustments, then edit the source for structural changes.
  • Adjust Motion transitions in the source and keep the reduced-motion behavior aligned with the final interaction.

Topic guides

See how this component fits into broader interface patterns, implementation decisions, and working examples.

3D Tilt Card FAQ

Is 3D Tilt Card free to use in commercial projects?

Yes. The public 3D Tilt Card source is available under the Apache License 2.0, including for commercial use, subject to the LICENSE terms.

How do I install 3D Tilt Card?

Run npx shadcn@latest add @spectrumui/tilt-card. The page also exposes the source for manual installation.

Does 3D Tilt Card require Motion?

Yes. Motion usage was detected in the documented source or registry dependencies for 3D Tilt Card.

Does 3D Tilt Card use shadcn/ui or Radix UI?

No shadcn/ui or Radix UI dependency was detected in the documented 3D Tilt Card source.

Can I use 3D Tilt Card in Next.js?

The documented React source is used in this Next.js application. Keep its use client directive when copying it into the App Router. Install the detected dependencies and verify any application-specific data or image configuration.

What accessibility checks should I run for 3D Tilt Card?

The source includes ARIA markup, reduced-motion handling. Test the finished interface with keyboard and screen-reader workflows.