GUEST
SATOSHI NAKAMOTO
DATE
JAN 03, 2009
TYPE
GENESIS PASS
000001 9816
Move your mouse over the ticket to interact with the 3D physics and holographic foil.
Installation
npm install framer-motion
npx kinetic-ui-cli@latest add conference-ticket
How It Works
This component uses framer-motion's useMotionValue and useSpring to smoothly track the mouse position. The mouse coordinates are mapped to the rotateX and rotateY properties to simulate 3D rotation (using CSS perspective and transform-style: preserve-3d).
The holographic glare is achieved by mapping the same X and Y mouse coordinates to the center points of radial CSS gradients using useTransform. These gradients are overlaid using mix-blend-color-dodge and mix-blend-overlay to dynamically lighten and colorize the ticket base exactly where the light would reflect.
The edge cutouts are created using advanced CSS mask-image with radial gradients, allowing the background to show through seamlessly.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { ConferenceTicket } from "@/components/creative/conference-ticket";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { ConferenceTicket } from "@/components/creative/conference-ticket";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<ConferenceTicket
name="example"
ticketNumber="example"
date="example"
/>
</div>
);
}