Ir al contenido

ActivityFeed

Quién hizo qué, y cuándo: la historia de un proyecto o de un registro. Cada línea es una frase con su persona, y hace cuánto, con la fecha exacta al pasar el puntero.

import { ActivityFeed, ActivityFeedSkeleton } from '@sypnia/ui/react'

En esta página
  1. Historia de un proyecto
  2. Vacío y cargando
  3. Skeleton
  4. Cuándo usarlo
  5. Para todos
  6. Props

Historia de un proyecto

History

  1. AR

    Ana Ruiz changed the price of Sourdough loaf

    $6.00 → $6.50
  2. The agent fixed TypeError in checkout

    Pull request #212 is waiting for a review.
  3. BC

    Bo Chen deployed main · 9f2c41a

  4. LG

    Lucía Gómez joined the project

  5. Nightly backup finished

Código
import { ActivityFeed, Panel } from '@sypnia/ui/react';

// Who did what, and when. Without an actor, the system did it. The exact date is on hover.
export default function Project() {
  return (
    <Panel title="History">
      <ActivityFeed label="History of the Shop project" items={[
        { id: 6, actor: { name: 'Ana Ruiz' }, action: 'changed the price of', target: 'Sourdough loaf', time: '2026-11-17T14:20:00Z', detail: '$6.00 → $6.50' },
        { id: 5, action: 'The agent fixed', target: 'TypeError in checkout', time: '2026-11-17T11:02:00Z', icon: 'agent', detail: 'Pull request #212 is waiting for a review.' },
        { id: 4, actor: { name: 'Bo Chen' }, action: 'deployed', target: 'main · 9f2c41a', time: '2026-11-16T18:45:00Z' },
        { id: 3, actor: { name: 'Lucía Gómez' }, action: 'joined the project', time: '2026-11-15T09:30:00Z' },
        { id: 2, action: 'Nightly backup finished', time: '2026-11-15T03:00:00Z', icon: 'backup' },
      ]} />
    </Panel>
  );
}

Vacío y cargando

Aún no ha pasado nada aquí

Código
import { ActivityFeed, ActivityFeedSkeleton } from '@sypnia/ui/react';

// With nothing yet it says so; while it loads, the skeleton of the same lines.
export default function States() {
  return (
    <div className="sy-cols sy-cols--stack">
      <ActivityFeed label="History of a new project" items={[]} />
      <ActivityFeedSkeleton items={3} />
    </div>
  );
}

Skeleton

  1. AR

    Ana Ruiz deployed main

  2. BC

    Bo Chen joined the project

Código
import { ActivityFeed, ActivityFeedSkeleton } from '@sypnia/ui/react';

// The feed and its skeleton: an avatar, a line and its time.
export default function Skeleton() {
  return (
    <div className="sy-cols sy-cols--stack">
      <ActivityFeed label="History" items={[{ id: 1, actor: { name: 'Ana Ruiz' }, action: 'deployed', target: 'main', time: '2026-11-17T10:00:00Z' }, { id: 2, actor: { name: 'Bo Chen' }, action: 'joined the project', time: '2026-11-16T10:00:00Z' }]} />
      <ActivityFeedSkeleton items={2} />
    </div>
  );
}

Cuándo usarlo

Úsalo cuando

  • La historia de un proyecto, un pedido, un documento.

No lo uses cuando

  • Pasos de un proceso en orden: usa Timeline.
  • Lo que escribe una máquina: usa LogViewer.

Para todos

  • Es una lista ordenada, lo más reciente primero; las horas se pueden leer por máquina.
  • Las historias largas se paginan.

Props

ActivityFeedTipoPor defecto
itemsobligatorio Activity[] | undefined
labelobligatorio string
empty ReactNode
loading

The activity is on its way. With `items` (the last known, or typical ones) each is drawn in its place, its line and time as bars as long as theirs; without, four skeleton items.

boolean
pageSize number 20
ActivityFeedSkeletonTipoPor defecto
items number 4
  1. Historia de un proyecto
  2. Vacío y cargando
  3. Skeleton
  4. Cuándo usarlo
  5. Para todos
  6. Props

    Busca páginas, secciones y términos