About
An interactive card stack that fans children into a shuffled deck and re-stacks them into a neat grid on hover, using GSAP for the transition.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Layered Stack to your project and fits it to your theme.
Code
How Layered Stack is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { LayeredStack } from "@/components/ui/layered-stack";
export default function LayeredStackDemo() {
return (
<div>
<LayeredStack className="grid grid-cols-4 gap-4 p-8">
{[...Array(12)].map((_, i) => (
<div
key={i}
className="text-muted-foreground bg-card flex size-32 items-center justify-center rounded-xl border text-xl font-medium"
>
{i + 1}
</div>
))}
</LayeredStack>
</div>
);
}
















