Skip to content
nexubDesign System
v12.7.0

Patterns · Data

ActivityFeed

Since v0.0.1

Chronological list of activity events with avatar, description, and timestamp.

import { ActivityFeed } from '@nexub/patterns';
View as Markdown

Examples

Default

  • Sarah K. created an invoice
    Invoice #1042 for Acme Corp
  • James L. approved a request
    Budget increase for Q2
  • Maria R. added a comment
    On the design review document

Groups, tones and actions

`ActivityFeed.Group` headers, `Date` timestamps (focus one for the full date), `tone` dots and a menu per item.

  • Today
    • Deploy to production finished
    • Contacts import failed
      Row 12 is missing an email.
  • Yesterday
    • Maria R. joined the workspace

Props

Props
PropTypeDefaultDescription
ActivityFeedItem titlerequiredReact.ReactNode—Activity event title. Block content is fine (a div since 11.5).
ActivityFeedItem descriptionReact.ReactNode—Supporting description. Block content is fine (a div since 11.5).
ActivityFeedItem timestampReactNode | Date—Text as given (e.g. "2 hours ago"), or (11.5) a Date: shown in <time dateTime> as relative text, a short date after a week, with the full date in a tooltip on hover or focus.
ActivityFeedItem actionsReact.ReactNode—11.5. Trailing controls, e.g. an IconButton or a menu trigger.
ActivityFeedItem tone'neutral' | 'info' | 'success' | 'warning' | 'danger'—11.5. A coloured dot in place of the avatar, or a badge on it. Decorative: say what happened in the title.
ActivityFeedGroup labelrequiredReact.ReactNode—11.5. ActivityFeed.Group header, e.g. "Today"; it names the group’s list.
ActivityFeedGroup headingLevel2 | 3 | 4 | 5 | 6—11.5. Renders the header as a heading for heading navigation. Default: a plain div.
ActivityFeedItem avatarReact.ReactNode—Avatar element for the actor.
emptyStateReact.ReactNode—Shown when there are no items.
errorStateReact.ReactNode—Shown in place of the items; wins over loading and emptyState.
loadingboolean—10.5: shows skeleton rows in place of the items and sets aria-busy.
loadingRowsnumber3Skeleton rows while loading.