Activity Stream
motiq/activity-streamFreeComponent
A collaboration/product activity feed that goes beyond a timeline: groups repeated actions, date separators, an unread divider, live arrival insertion, and event-type/actor filtering. Presentation-only — the app supplies events.
Live preview
live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.motiq.dev/r/activity-stream.jsonSource
1"use client";23import * as React from "react";4import { motion, AnimatePresence, type Transition } from "motion/react";56import { cn } from "@/lib/utils";7import {8 useReducedMotion,9 useVisibilityPause,10 formatTimestamp as defaultFormatTimestamp,11 statusVars,12 formatNumber,13 scrollIntoViewWithin,14 streamItemVariants,15 type StatusTone,16} from "@/lib/motiq";1718/* --------------------------------------------------------------------------19 * ActivityStream — a collaboration activity feed that is more than a dotted20 * timeline. It groups repeated actions (collapse/expand), draws date21 * separators, marks an unread boundary, animates live-arriving items, and22 * filters by event type (and optional actor).23 *24 * Presentation only: the application owns the events array (from any realtime25 * or history source) and, optionally, the filter state. The component holds no26 * data of its own — it renders what it is given. Clean-room original.27 * ----------------------------------------------------------------------- */2829export type ActivityEventType =30 | "created"31 | "edited"32 | "commented"33 | "mentioned"34 | "assigned"35 | "approved"36 | "rejected"37 | "uploaded"38 | "published"39 | "archived"40 | "restored"41 | "joined"42 | "left";4344export interface ActivityActor {45 /** Stable identity — drives filtering and avatar hue. */46 id: string;47 /** Human name; also the avatar's accessible text. */48 name: string;49 /** Optional avatar image; when absent an initials + hue avatar is generated. */50 avatarUrl?: string;51 /** Optional explicit avatar color (any CSS color). */52 color?: string;53}5455export interface ActivityEvent {56 /** Stable id — drives React keys and live-arrival animation. */57 id: string;58 type: ActivityEventType;59 actor: ActivityActor;60 /** What was acted on, e.g. "the onboarding guide". Optional for joined/left. */61 target?: string;62 /** Full verb-phrase override, e.g. "renamed". Falls back to the type's verb. */63 action?: string;64 timestamp: Date | number | string;65 /** Free-form metadata rendered as small chips (or via `renderMetadata`). */66 metadata?: Record<string, string | number>;67 /** Optional short preview/excerpt (e.g. a comment body). */68 preview?: string;69 /** Optional deep link to the target. */70 link?: string;71 /** Optional inline action button label (calls `onEventAction`). */72 actionLabel?: string;73 /** Override the grouping bucket; defaults to actor + type + target. */74 groupKey?: string;75}7677// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from motiq
All 100 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Adaptive Safe-Zone Gridadaptive-safe-zone-grid | motiq | Components | Free | no deps | |
| Agent Run Timelineagent-run-timeline | motiq | Components | Free | 1 dep | |
| AI Response Streamai-response-stream | motiq | Components | Free | 1 dep | |
| Animated Accordionanimated-accordion | motiq | Components | Free | 2 deps | |
| Animated Buttonanimated-button | motiq | Components | Free | 1 dep | |
| Animated Dialoganimated-dialog | motiq | Components | Free | 2 deps | |
| Animated Gridanimated-grid | motiq | Components | Free | 2 deps | |
| Animated Iconsanimated-icons | motiq | Components | Free | 1 dep |
