Kinetic UI
Back to Introduction
Cards

3D Card Peeling

An interactive card that can be grabbed and peeled off its background layer using advanced 3D transforms.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add 3d-card-peel
3D Card Peeling

3D Card Peeling

Hover over the card to physically peel it off the background, revealing the hidden layers underneath.

Installation

npx kinetic-ui-cli@latest add 3d-card-peel

How It Works

The ThreeDCardPeel component uses advanced CSS 3D transforms (preserve-3d, perspective, rotateX, rotateY) combined with framer-motion's whileHover spring physics. It layers two separate DIVs (a foreground and a background). When hovered, the foreground dynamically alters its origin-top-right rotation to peel away from the container, while injecting a glossy linear-gradient overlay to simulate the lighting change on the sticker's surface.

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { ThreeDCardPeel } from "@/components/creative/3d-card-peel";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { ThreeDCardPeel } from "@/components/creative/3d-card-peel";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <ThreeDCardPeel
        frontImage="example"
        backImage="example"
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.