Timeline

Línea de tiempo de visualización vertical. Se utiliza para mostrar visualmente eventos cronológicos o una serie de pasos.

Timeline

  • 2024-09-01
    Create a services site
    Network problems being solved
  • 2024-09-02
    Solve initial network problems
    Technical testing
  • 2024-09-05
    Technical testing
    Network problems being solved

Timeline

TimelineItems soportan diferentes tamaños (sm, md, lg), iconos personalizados (a través de la propiedad icon) y estados (default, primary, success, error, warning, process).

  • 09:00 AM
    Account created
    Welcome to the platform.
  • 09:30 AM
    Profile updated
    User updated their avatar.
  • 10:15 AM
    Payment failed
    Transaction declined by the bank.
  • 10:20 AM
    Retrying payment...
    Waiting for user to update payment method.
  • Processing
    System is processing the new request.
astro
---
import Timeline from '@/components/data-display/Timeline.astro';
import TimelineItem from '@/components/data-display/TimelineItem.astro';
---

<Timeline>
    <TimelineItem title="Account created" time="09:00 AM" status="success" size="lg" icon="Check">
        Welcome to the platform.
    </TimelineItem>
    <TimelineItem title="Profile updated" time="09:30 AM" status="primary" size="md" icon="User">
        User updated their avatar.
    </TimelineItem>
    <TimelineItem title="Payment failed" time="10:15 AM" status="error" size="md" icon="X">
        Transaction declined by the bank.
    </TimelineItem>
    <TimelineItem title="Retrying payment..." time="10:20 AM" status="warning" size="md" icon="TriangleAlert">
        Waiting for user to update payment method.
    </TimelineItem>
    <TimelineItem title="Processing" status="process">
        System is processing the new request.
    </TimelineItem>
</Timeline>

Timeline

Puedes personalizar completamente el contenido de un elemento de la línea de tiempo usando los slots por defecto para el cuerpo, o el slot dot para el propio nodo de la línea de tiempo.

  • 1 week ago
    Release v1.2.0
    • Added Timeline component
    • Improved contrast in dark mode
    • Fixed modal positioning
  • 2 weeks ago
    Code Review

    Pending review from @johndoe

Referencia API

Timeline

Propiedad
Descripción
Tipo
Por defecto

align

Alineación de la línea de tiempo 'left' | 'right' | 'alternate' 'left'

TimelineItem

Propiedad
Descripción
Tipo
Por defecto

status

Estado visual/color del nodo de la línea de tiempo 'default' | 'primary' | 'success' | 'error' | 'process' | 'warning' 'default'

size

Tamaño del nodo de la línea de tiempo 'sm' | 'md' | 'lg' 'sm'

title

Timeline string '-'

time

Texto de la hora o fecha string '-'

icon

Nombre del icono a mostrar dentro del nodo IconName '-'