VibeUI
ComponentsDocs
VibeUI

Components with taste, that you own. Copy the source, retint the tokens, keep every line.

Library

  • All components
  • Signature pieces
  • Text effects
  • Footers

Docs

  • Introduction
  • Installation
  • Theming
  • CLI

Project

  • GitHub
  • Agents and MCP
  • Issues
  • MIT license
© 2026 VibeUI · MIT licensed
  1. Components
  2. Feedback
  3. Notification

Notification

Notification row with an unread dot, title, body and timestamp.

FeedbackServer-safe

Draft published

2m

Your changelog is live on the preview URL.

New comment

1h

Maya left a note on the pricing section.

Theme synced

3h

Dark tokens were updated.

Install

bash
npx @agents-npm-packages/vibeui add notification --dir ./src/components/ui

Import

tsx
import { NotificationItem } from "@/components/ui/notification"

API

Generated from the component's TypeScript types, so it always matches the source. * marks a required prop.

<NotificationItem>

PropTypeDefaultDescription
title*string—Heading text.
body*string—Message text.
time*string—Timestamp label, e.g. “2m”.
unreadboolean—Shows an animated unread dot.
classNamestring—Extra classes, merged with the component's own.

Source

src/components/ui/notification.tsx
import { cn } from "@/lib/utils";

/** Notification row with an unread dot, title, body and timestamp. */
export function NotificationItem({
  title,
  body,
  time,
  unread,
  className,
}: {
  title: string;
  body: string;
  time: string;
  unread?: boolean;
  className?: string;
}) {
  return (
    <div
      className={cn(
        "flex animate-fade-up gap-3 rounded-md px-3 py-3 transition-[background-color,transform] duration-200 hover:translate-x-0.5 hover:bg-surface-muted/70",
        className,
      )}
    >
      <span
        aria-label={unread ? "Unread" : undefined}
        className="relative mt-[7px] flex size-2 shrink-0"
      >
        {unread ? (
          <span className="absolute inset-0 animate-ping-soft rounded-full bg-accent opacity-50" />
        ) : null}
        <span
          className={cn(
            "relative size-2 rounded-full transition-colors duration-300",
            unread ? "bg-accent" : "bg-line-strong",
          )}
        />
      </span>
      <div className="min-w-0 flex-1">
        <div className="flex items-baseline justify-between gap-2">
          <p className="truncate text-sm font-medium text-ink">{title}</p>
          <time className="shrink-0 text-[11px] text-faint">{time}</time>
        </div>
        <p className="mt-0.5 line-clamp-2 text-[13px] leading-relaxed text-muted">
          {body}
        </p>
      </div>
    </div>
  );
}

Exports NotificationItem. Peer dependencies: clsx, tailwind-merge.

PreviousMeterNextProgress