Ir al contenido

Timeline

Lo que pasó, en orden: despliegues, pagos, cambios. Lo más reciente primero, cada uno con hace cuánto y su fecha exacta.

import { Timeline, TimelineSkeleton } from '@sypnia/ui/react'

En esta página
  1. Despliegues de un proyecto
  2. Skeleton
  3. Cuándo usarlo
  4. Para todos
  5. Props

Despliegues de un proyecto

Cuatro momentos, tres tonos.

  1. Deploy 42 is live

    storefront.sypnia.app now serves the new checkout.
  2. Build 42 failed, then passed

    A test was flaky; it passed on the second try.
  3. Deploy 41 rolled back

    Errors went above 2 %. The previous version came back in 40 s.
  4. Project created

Código
import { Timeline } from '@sypnia/ui/react';

// Fixed moments, so the page is the same on the server and in the browser.
const h = (n: number) => Date.UTC(2026, 10, 17, 12, 0) - n * 3600 * 1000;
// The newest first. Each moment says how long ago, with the exact date on hover.
export default function Deploys() {
  return (
    <Timeline label="Deploys of storefront" items={[
      { id: 4, title: 'Deploy 42 is live', time: h(0.4), tone: 'ok', icon: 'check', description: 'storefront.sypnia.app now serves the new checkout.' },
      { id: 3, title: 'Build 42 failed, then passed', time: h(1.2), tone: 'warn', description: 'A test was flaky; it passed on the second try.' },
      { id: 2, title: 'Deploy 41 rolled back', time: h(26), tone: 'fail', icon: 'error', description: 'Errors went above 2 %. The previous version came back in 40 s.' },
      { id: 1, title: 'Project created', time: h(24 * 40) },
    ]} />
  );
}

Skeleton

La pieza real y su skeleton: la misma caja, así nada se mueve cuando llegan los datos.

  1. Laura invited Diego

  2. Backup finished

Código
import { Timeline, TimelineSkeleton } from '@sypnia/ui/react';

export default function Skeleton() {
  return (
    <div className="sy-grid" style={{ ['--min' as string]: '16rem' }}>
      <Timeline label="Activity" items={[{ id: 1, title: 'Laura invited Diego', time: '2026-11-17T11:50:00Z' }, { id: 2, title: 'Backup finished', time: '2026-11-17T10:00:00Z', tone: 'ok' }]} />
      <TimelineSkeleton items={2} />
    </div>
  );
}

Cuándo usarlo

Úsalo cuando

  • La historia de una cosa.
  • Dale a cada elemento un tone: también cambia su marca, y un icono lo dice de otra forma.

No lo uses cuando

  • Muchos sucesos de muchas cosas para buscar: LogViewer o DataTable.

Para todos

  • Es una lista ordenada con nombre. Las horas son elementos time con la fecha exacta.
  • El tono nunca es la única señal: el título dice qué pasó.

Props

TimelineTipoPor defecto
itemsobligatorio TimelineItem[]
labelobligatorio string
TimelineSkeletonTipoPor defecto
items number 3
  1. Despliegues de un proyecto
  2. Skeleton
  3. Cuándo usarlo
  4. Para todos
  5. Props

    Busca páginas, secciones y términos