Skip to content
VenusUI
Get started

Notification Stack

Phone-style stacked notifications with frosted glass that fan out into a list on hover or click.

Preview

Installation

npx shadcn@latest add @venusui/notification-stack

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/notification-stack.tsx

Usage

The code behind the preview above.

notification-stack-demo.tsx

import { Activity, CalendarDays, Mail, MessageCircle } from "lucide-react"

import { NotificationStack } from "@/components/ui/notification-stack"

// Wallpaper and portraits: Unsplash (free under the Unsplash License). People are made up.
const WALLPAPER = "https://images.unsplash.com/photo-1614850523459-c2f4c699c52e?w=900&h=1100&fit=crop&auto=format&q=70"
const face = (id: string) => `https://images.unsplash.com/photo-${id}?w=96&h=96&fit=crop&crop=faces&auto=format&q=80`

export default function NotificationStackDemo() {
  return (
    <div
      className="flex w-[min(24rem,calc(100vw-3rem))] flex-col rounded-[2rem] bg-cover bg-center p-4 pt-10 pb-24 shadow-xl"
      style={{ backgroundImage: `url(${WALLPAPER})` }}
    >
      <p className="text-center text-5xl font-light tracking-tight text-white/95 tabular-nums">9:41</p>
      <p className="mb-8 text-center text-sm font-medium text-white/80">Monday, 16 November</p>
      <NotificationStack
        className="[&>div:first-child]:text-white"
        notifications={[
          {
            id: "1",
            app: "Messages",
            title: "Priya Natarajan",
            body: "Landing at 6:40! See you at arrivals? I’ll be the one with way too many bags.",
            time: "now",
            avatar: face("1494790108377-be9c29b29330"),
            icon: <MessageCircle />,
            iconClassName: "bg-emerald-500",
          },
          {
            id: "2",
            app: "Calendar",
            title: "Design review",
            body: "In 15 minutes · Room 4B · with Sofie and Marcus",
            time: "9:45",
            icon: <CalendarDays />,
            iconClassName: "bg-rose-500",
          },
          {
            id: "3",
            app: "Mail",
            title: "Marcus Reid",
            body: "Re: Q4 launch plan. Looks great overall, one note on the pricing page before we ship.",
            time: "9:12",
            avatar: face("1507003211169-0a1dd7228f2d"),
            icon: <Mail />,
            iconClassName: "bg-sky-500",
          },
          {
            id: "4",
            app: "Fitness",
            title: "Move goal reached",
            body: "You closed your rings before 9 am. That’s 6 days in a row.",
            time: "8:58",
            icon: <Activity />,
            iconClassName: "bg-orange-500",
          },
        ]}
      />
    </div>
  )
}

API reference

PropTypeDefaultDescription
notificationsStackNotification[]—Each has id, app, title, body, time, and optionally icon, iconClassName (icon background) and avatar (a photo URL).
headingstring"Notifications"Heading above the stack.
expanded, defaultExpandedboolean—Controlled or initial state. Unset, it fans out on hover and toggles with the button or a click.
onExpandedChange(expanded: boolean) => void—Called when the button or a click expands or collapses it.

All <div> props.

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Put it over a photo or gradient to show off the frosted glass, as in the demo.
  • Cards are 76px tall with two lines of body text; keep bodies short.

Accessibility

  • Every notification is always in the list for screen readers, with the app name before the message.
  • “Show all” / “Show less” is a real button with aria-expanded; hovering and clicking the stack are pointer shortcuts.
  • With reduced motion it expands without animation.

Troubleshooting

The glass looks solid.
Frosted glass needs something colorful behind it; on a plain background it looks like a white card.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

Receipt Printer

Animations

A receipt that prints out of a slot line by line, with itemized totals and a torn zig-zag edge.

Loading preview

Terminal

Data display

A terminal window that types commands and prints their output when it scrolls into view.

Loading preview

Weather Widget

Data display

A weather widget with a live sky: turning sun rays, drifting clouds, falling rain or snow, and twinkling stars.