averouiComponent playgroundv0.0.1

Timeline

New

Tell the story of an order, a project or a series of milestones.

Vertical and horizontalCustom templatesResponsive

Order history

Choose an orientation and content position. On small screens, vertical events stack on one side.

  1. September 18 · 09:30

    Ordered

    Your order has been confirmed.

  2. September 18 · 11:00

    Processing

    Your items are being prepared for dispatch.

  3. September 19 · 08:15

    Shipped

    Your package is on its way.

  4. September 20 · 14:20

    Delivered

    Your package has arrived. Enjoy your order!

Select an event to view its details.

Basic

Primitive values work without templates. Objects use a content template to choose what to display.

  1. Plan
  2. Build
  3. Review
  4. Release

Templates

Import AvTimeline, AvTimelineContent, AvTimelineOpposite and AvTimelineMarker from avero-ui. Each template receives the event, index, first and last. Bind the event collection to each directive for type inference.

HTML
<av-timeline [value]="events" align="alternate" label="Order history">
  <ng-template [avTimelineContent]="events" let-event let-index="index">
    <h3>{{ event.status }}</h3>
    <p>{{ event.description }}</p>
  </ng-template>
  <ng-template [avTimelineOpposite]="events" let-event>
    {{ event.date }}
  </ng-template>
  <ng-template [avTimelineMarker]="events" let-event>
    <span class="custom-marker">{{ event.symbol }}</span>
  </ng-template>
</av-timeline>

Usage and API

Inputs: value, label, layout, align, trackBy and emptyMessage. The default layout is vertical. Use left or right for vertical alignment, top or bottom for horizontal alignment, or alternate for either orientation. Left places the content to the right of the line; right reverses it. In horizontal mode, left and right fall back to bottom.

Data and actions. Events stay in the supplied order. Pass a new array when the collection changes. Timeline has no built-in selection; place buttons or links in the content template and handle their actions in your application. Markers are decorative and should not contain interactive controls.
Customization. Style your templates and override --av-timeline-accent, --av-timeline-color, --av-timeline-muted, --av-timeline-marker-size, --av-timeline-marker-background, --av-timeline-line-color, --av-timeline-line-width, --av-timeline-event-height and --av-timeline-event-width.
Avero UI Designed to fit your application.