Lab // Index
Total: 04Component // Animation
01 of 04Origin Aware Cards
Interactive card component with origin-aware animations using Framer Motion
Demo // Live
InteractiveInstall // Steps
Total: 03Step 01
Copy and paste the following code into your project.
import { OriginAwareCards } from "@/components/craft/origin-aware-cards";
const cards = [
{
id: 1,
title: "Virat Kohli - Cricket Legend",
shortDescription: "One of cricket's greatest batsmen and India's most successful Test captain",
longDescription: "Virat Kohli is an Indian cricket icon and former captain widely regarded as one of the greatest all-format batters of all time...",
image: "/images/virat-card-image.jpg",
},
{
id: 2,
title: "Cristiano Ronaldo - Football Icon",
shortDescription: "Five-time Ballon d'Or winner and all-time leading international goalscorer",
longDescription: "Cristiano Ronaldo is a Portuguese football legend and one of the greatest players in history...",
image: "/images/cristiano-card-image.jpg",
},
];
export default function MyComponent() {
return <OriginAwareCards cards={cards} />;
}Step 02
Update the import paths to match your project setup.
Make sure the import path matches where you saved the component file in your project.
Step 03
Install Motion if you haven't already
npm install motionSpec // Features
Total: 04- 01
Origin-aware animations
Cards expand from their exact position using layout animations
- 02
Simple and clean
Minimal design with smooth transitions
- 03
Dark mode
Fully styled for both light and dark themes
- 04
Responsive
Works seamlessly across all device sizes
Spec // Props
Total: 01| Prop | Type | Description |
|---|---|---|
| cards | Card[] | Array of card objects with id, title, shortDescription, longDescription, and image |


