About
A stacked card/notification layout (like Sonner's toast stacking) whose items expand into a fanned-out list on hover.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Stack to your project and fits it to your theme.
Code
How Stack is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Stack, StackItem } from "@/components/ui/stack";
export default function StackNoExpandDemo() {
return (
<div className="flex min-h-[400px] items-center justify-center">
<Stack expandOnHover={false} className="w-[360px]">
<StackItem className="flex flex-col gap-2">
<h3 className="font-semibold">Static Stack</h3>
<p className="text-sm text-muted-foreground">
This stack doesn't expand on hover
</p>
</StackItem>
<StackItem className="flex flex-col gap-2">
<h3 className="font-semibold">Item 2</h3>
<p className="text-sm text-muted-foreground">
The stacking effect remains constant
</p>
</StackItem>
<StackItem className="flex flex-col gap-2">
<h3 className="font-semibold">Item 3</h3>
<p className="text-sm text-muted-foreground">
Perfect for permanent visual hierarchy
</p>
</StackItem>
</Stack>
</div>
);
}
















