v0.5.1

Activity Feed

Chronological list of user actions and system events, in simple, timeline, grouped, or notification panel form.

  • Anna Chen commented on Project Atlas
    2h ago

Installation

npx paubha@latest add activity-feed

Usage

import {
  ActivityFeed,
  ActivityFeedItem,
} from "@/components/ui/activity-feed";
import { Avatar } from "@/components/ui/avatar";

<ActivityFeed>
  <ActivityFeedItem
    avatar={<Avatar initials="AC" alt="Anna Chen" size="sm" />}
    title={
      <>
        <span className="font-semibold">Anna Chen</span> commented on Project
        Atlas
      </>
    }
    timestamp="2h ago"
  />
</ActivityFeed>

Examples

Simple activity list

  • Anna Chen commented on Project Atlas
    2h ago
  • Jordan Lee invited you to a meeting
    4h ago
  • Olivia Rhye uploaded 3 files to Design Assets
    1d ago

Timeline feed

Timeline feed

  • Project Atlas launched

    Today · 10:20 AM

    Completed
  • Design review scheduled

    Yesterday · 4:30 PM

    In Progress
  • Database migration completed

    Oct 12 · 9:05 AM

    Success
  • Weekly sync scheduled

    Oct 10 · 2:00 PM

    Scheduled

Grouped activity feed

Today

  • Anna Chen commented on Project Atlas
    2h ago
  • Jordan Lee invited you to a meeting
    4h ago

Yesterday

  • Olivia Rhye uploaded new design assets
    1d ago

Notification panel

Notifications

  • Anna Chen mentioned you in a comment
    2h ago
  • Jordan Lee invited you to a meeting
    4h ago
  • Olivia Rhye uploaded new design assets
    1d ago

API reference

ActivityFeed

PropTypeDefaultDescription
dividedbooleanfalseDraws a divider between rows.
classNamestring—Merged onto the root list element.
childrenReact.ReactNode—ActivityFeedItem or ActivityFeedTimelineItem children.

ActivityFeedItem

PropTypeDefaultDescription
avatarReact.ReactNode—Leading media, typically <Avatar size="sm" />.
titleReact.ReactNode—Primary activity line (actor + action).
timestampReact.ReactNode—Relative or absolute time under the title.
unreadbooleanfalseShows a brand unread indicator on the trailing edge.

ActivityFeedGroup

PropTypeDefaultDescription
labelReact.ReactNode—Section label, e.g. "Today", "Yesterday".
childrenReact.ReactNode—Usually an ActivityFeed of items.

ActivityFeedTimelineItem

PropTypeDefaultDescription
titleReact.ReactNode—Event title.
timestampReact.ReactNode—Trailing timestamp on the title row.
statusReact.ReactNode—Status row under the title, pass a Paubha Badge.
lastbooleanfalseHides the downward timeline connector.

ActivityFeedPanel

PropTypeDefaultDescription
titleReact.ReactNode"Notifications"Panel heading.
onMarkAllRead() => void—Shows the "Mark all read" button when provided.
markAllReadLabelReact.ReactNode"Mark all read"Label for the mark-all action.
childrenReact.ReactNode—Usually an ActivityFeed of items.

Accessibility

Accessibility

  • List. ActivityFeed is a native <ul>; each item is a native <li>.

  • Timestamps. Plain text; prefer relative strings that stay readable without needing live updates.

  • Unread. The unread dot is decorative ( aria-hidden); convey unread state in the item text or aria-label when needed.

  • Mark all read. Real role="button" with visible focus via shadow-glow-focus.

  • Timeline rail. Decorative; aria-hidden on the connector.