Installation
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | "Design Systems" | Main title displayed on both sides |
subtitle | string | "Explore the fundamentals" | Subtitle on front of card |
description | string | - | Description shown on back of card |
features | string[] | ["UI/UX", ...] | List of features shown on back |
Features
- 3D Flip Animation: Smooth 180° Y-axis rotation on hover
- Perspective Transform: CSS 3D transforms with preserved 3D space
- Animated Background: Particle-like effect on front side
- Staggered Feature List: Features appear with delay on flip
- Dual-sided Content: Different content on front and back
- Gradient Hover States: Interactive gradient backgrounds
- Icon Animations: Rotating and scaling icon indicators
Styling
The card uses:[perspective:2000px]for 3D depth[transform-style:preserve-3d]for child 3D positioning[backface-visibility:hidden]to hide non-visible side- Custom
@keyframes scaleanimation for particles
Animation Timeline
- Initial State: Front side visible, back side hidden
- On Hover: Card rotates 180° over 700ms
- Features Appear: Each feature slides in with 100ms stagger
- Icon Rotation: Icon rotates and scales simultaneously
Customization Example
Dependencies
lucide-react(ArrowRight, Repeat2 icons)@/lib/utils(cn helper)
Technical Details
- Uses CSS transforms for hardware acceleration
- Flip state managed with React useState
- Mouse enter/leave triggers flip
- Back side content positioned with absolute positioning
- Orange accent color theme (customizable)