Dice UI

Stack

Cards 15

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 StackDemo() {
  return (
    <Stack className="w-[360px]" expandOnHover>
      <StackItem className="flex flex-col gap-2">
        <h3 className="font-semibold">Notification 1</h3>
        <p className="text-sm text-muted-foreground">
          Your deployment was successful
        </p>
      </StackItem>
      <StackItem className="flex flex-col gap-2">
        <h3 className="font-semibold">Notification 2</h3>
        <p className="text-sm text-muted-foreground">
          New message from John Doe
        </p>
      </StackItem>
      <StackItem className="flex flex-col gap-2">
        <h3 className="font-semibold">Notification 3</h3>
        <p className="text-sm text-muted-foreground">
          Update available for your app
        </p>
      </StackItem>
    </Stack>
  );
}

Dependencies

More by Dice UI

View all
  • Compare Slider

    Compare Slider

    89
  • Sortable

    Sortable

    55
  • Circular Progress

    Circular Progress

    45
  • Status

    Status

    42
  • Pending

    Pending

    33
  • Banner

    Banner

    24
  • Kanban Board

    Kanban Board

    14
  • Marquee

    Marquee

    12

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Approval Card

    Approval Card

    33
  • Statistics Card 7

    Statistics Card 7

    334
  • Photo Deck

    Photo Deck

    36
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    693
  • Statistics Card 10

    Statistics Card 10

    300
  • Card Studio

    Card Studio

    37
  • Product List 01

    Product List 01

    26

Explore more

Part of Dice UI — browse the full library on 21st.dev.