Components / Others
Stacked Cards Effect
Free Others React component — StackedCardsEffect. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.
Three skewed cards fanned behind a front hero card — hover brings subtle motion. Collection and portfolio layouts with depth, no Three.js required.
Preview


Bidyut Kundu
3 new cards
Your saved design collection with 12 components ready to use.
Setup
How to use
Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.
- 1
Run in your terminal:
$npm install clsx tailwind-merge lucide-react - 2
Copy
lib/cn.tsbelow. Skip if you already havecn(). - 3
Copy the code below and create
components/others/stacked-cards-effect.tsxin your project. - 4
Import and render:
Exampleimport { StackedCardsEffect } from "@/components/others/stacked-cards-effect";
lib/cn.ts
import { type ClassValue, clsx } from "clsx";import { twMerge } from "tailwind-merge";export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs));}
components/others/stacked-cards-effect.tsx
import React, { forwardRef } from "react";import Image from "next/image";import { cn } from "@/lib/cn";export const StackedCardsEffect = forwardRef<HTMLDivElement,React.HTMLAttributes<HTMLDivElement>>(({ className = "", ...props }, ref) => (<divref={ref}className={cn("group relative h-64 w-56 font-sans", className)}{...props}><div className="absolute inset-x-4 top-8 bottom-0 -rotate-6 rounded-2xl bg-neutral-200 transition-transform duration-500 group-hover:rotate-[-8deg]" /><div className="absolute inset-x-2 top-4 bottom-0 rotate-3 rounded-2xl border border-neutral-200 bg-neutral-100 transition-transform duration-500 group-hover:rotate-[5deg]" /><div className="absolute inset-0 overflow-hidden rounded-2xl border border-neutral-100 bg-white shadow-lg transition-transform duration-500 group-hover:-translate-y-1"><div className="relative h-28 overflow-hidden"><Imagesrc="/dith-homee.png"alt="Card"fillsizes="288px"className="object-cover"/></div><div className="p-4"><div className="mb-2 flex items-center gap-2"><div className="relative h-7 w-7 overflow-hidden rounded-full border border-neutral-100"><Imagesrc="/profile-picture.png"alt="User"fillsizes="28px"className="object-cover"/></div><div><p className="text-xs font-semibold text-neutral-900">Bidyut Kundu</p><p className="text-[10px] text-neutral-400">3 new cards</p></div></div><p className="text-[11px] leading-relaxed text-neutral-500">Your saved design collection with 12 components ready to use.</p><div className="mt-3 flex gap-1.5">{["UI", "Cards", "Nav"].map((tag) => (<spankey={tag}className="rounded-full bg-neutral-100 px-2 py-0.5 text-[9px] font-medium text-neutral-600">{tag}</span>))}</div></div></div></div>));StackedCardsEffect.displayName = "StackedCardsEffect";