Activity Feed

Who did what in a workspace, grouped by day, filtered, and live.

PROGet Activity Feed and 168 other Pro components with pro lifetime — Get Pro

Category
Workspace
Access
Pro
Source
629 lines · one file
States
6 drawn

The decision inside it

It never moves what you are reading

Events that arrive while you are further down wait behind a small pill that says how many are new. Press it, or scroll back up, and they open in. At the top there is nobody to interrupt, so they appear straight away.

When to use it

Use Activity Feed for "who did what" in a workspace: grouped by day, sentence rows with avatars, repeated actions folded, tabs by kind, search, an "N new" pill and load earlier.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Activity Feed for this.
Install it: npx shadcn@latest add @liro/activity-feed
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/activity-feed.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/activity.tsx
import { ActivityFeed, type ActivityEvent } from "@/components/ui/activity-feed";

const events: ActivityEvent[] = [
  { id: "1", at: "2026-10-18T09:12:00Z", actor: { name: "Ada Moss" }, kind: "signature", verb: "signed", target: { label: "Vertically MSA" } },
  { id: "2", at: "2026-10-18T08:40:00Z", actor: { name: "Michael Carter" }, kind: "comment", verb: "commented on", target: { label: "Q4 plan" }, detail: { quote: "Let's ship Friday." } },
];

export function Activity({ loadMore, hasMore }: { loadMore: () => Promise<void>; hasMore: boolean }) {
  return <ActivityFeed events={events} searchable onLoadMore={loadMore} hasMore={hasMore} maxHeight={480} />;
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
eventsActivityEvent[] YesIn any order. The feed sorts them newest first.
onOpen(target: ActivityTarget, event: ActivityEvent) => void NoCalled when a target is pressed. Without it, targets are plain text.
nowDate | number No"Now", for the relative times and for Today and Yesterday. Defaults to the clock, and then keeps time.
localestring NoA BCP 47 tag for dates and times: "en-GB". Defaults to the reader's own.
titleReact.ReactNode | false NoThe heading. Pass `false` to hide it.
filterstring NoThe kind being shown, or "all". Leave it out and the feed keeps its own.
defaultFilterstring NoDefault "all".
onFilterChange(filter: string) => void NoCalled with the kind, or "all", when a filter is chosen.
searchableboolean NoShow the search field. Default true.
kindsRecord<string, ActivityKindInfo> NoName, icon and plural for your own kinds, or to rename the six built in.
groupWindowMsnumber NoHow close together one person's repeats must be to share a row. Default ten minutes.
unreadSinceDate | number | string NoDraws one "New" line under everything later than this moment.
onLoadMore() => void | Promise<void> NoAdds "Show earlier activity". Return a promise: it shows the wait, and a rejection offers Retry.
hasMoreboolean NoWhether there is anything earlier to load. Default false.
maxHeightnumber | string NoScrolls the feed inside itself at this height. Leave it out and it grows with the page.
loadingboolean NoWaiting for the first page. Shows rows shaped like the feed.
lookLook NoLayered sets the feed on a card in a tray, the title, search and filter above it. Flat is the card alone.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-themeavatarbadgebuttondropdown-menuinputstate

States

All of them are drawn by the component. None is left for you to design.

  • All activity
  • Filtered
  • Group expanded
  • New activity waiting
  • Loading earlier
  • Nothing matches

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances