Skip to content

Timeline for Angular

AngularLayout and content

Shows an activity or event history: items with a time (an exact instant or an all-day date), a title, a description, an icon or avatar, a status tone shown by icon and word, and keyboard-reachable actions. Vertical or horizontal, items on one side or alternating, grouped by day in the configured timezone with business-calendar names for holidays and non-working days, relative or absolute times, and older items collapsed behind ‘Show N older’ or loaded on demand with loading, error, and retry states.

  • Grouped by dayToday, Yesterday, weekdays, and dates in your timezone; holidays and non-working days named from a business calendar.
  • Status you can readEvery tone has its own marker icon and a status word, so nothing depends on color.
  • Three layoutsVertical, alternating sides, or a horizontal milestone strip that scrolls with the keyboard.
  • Older on demandCollapse older items behind "Show N older" or load them from your server with loading, error, and retry.
  • Actions per itemButtons grouped and named by the item, reachable with Tab, reported as aui-action.

Behavior, design tokens, and limitations are described on the Timeline page; this page covers the Angular API.

import { Component } from '@angular/core';
import { instant } from '@absoluteui/core';
import type { TimelineActionDetail, TimelineItem } from '@absoluteui/components/timeline';
import { AuiTimeline } from '@absoluteui/angular/timeline';
@Component({
selector: 'app-activity',
imports: [AuiTimeline],
template: `<aui-timeline label="Activity" [items]="items" timeFormat="relative" (action)="onAction($event)"></aui-timeline>`,
})
export class ActivityComponent {
items: TimelineItem[] = [{ id: 'a1', title: 'Request approved', tone: 'success', time: instant(Date.now() - 600_000), actions: [{ id: 'open', label: 'Open' }] }];
last = '';
onAction(detail: TimelineActionDetail): void {
this.last = detail.actionId;
}
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiTimeline } from '@absoluteui/angular/timeline';

Defaults for every instance: provideAbsoluteUIConfig({ components: { timeline: { ... } } }) (see Configuration).

Class AuiTimeline; template reference #ref="auiTimeline".

Server rendering: Renders on the server; the browser re-creates it after hydration.

Input Type Default Description
label string Required. Accessible name of the list (and of the scroll region when horizontal).
items readonly TimelineItem[] Required. Items in display order: { id, title, time?, description?, tone?, status?, icon?, avatar?, href?, actions? }.
order TimelineOrder 'newest-first' Order of items; older items collapse and load at the older end.
initialVisible number | null null Show this many items and collapse the older rest behind ‘Show N older’.
loadMore (context: TimelineLoadContext) => Promise<readonly TimelineItem[]>) | nul null Fetch older items; the context has an AbortSignal and the oldest item.
hasMore boolean 'true when loadMore is set' More items can be loaded; an empty result sets it to false.
businessCalendar BusinessCalendarEngine | null null Names holidays and non-working days in day headings.
headingLevel 2 | 3 | 4 | 5 | 6 '3' Heading level of day headings.
now Instant 'the current instant' Reference for relative times and ‘Today’.
empty string 'localized 'No activity yet.'' Text when there are no items.
icons Partial<TimelineIcons> Tone markers, ‘Show older’, and retry icons.
orientation TimelineOrientation 'vertical' Direction of the line.
layout TimelineLayout 'start' Items on one side, or alternating sides (vertical).
timeFormat TimelineTimeFormat 'absolute' ‘3 hours ago’ or a formatted time; the full date is always in the title and datetime.
groupByDay boolean true Group consecutive items of the same day under a day heading.
locale string Locale for dates, numbers, and messages.
timezone string IANA timezone for grouping and formatting instants.
Output Payload Description
(action) TimelineActionDetail An item action was activated: { itemId, actionId, item }. Re-emits aui-action.
(toggled) TimelineToggleDetail Older items were shown or collapsed: { expanded }. Re-emits aui-toggle.
(loadedMore) TimelineLoadMoreDetail loadMore resolved: { items, hasMore }. Re-emits aui-load-more.
(loadError) TimelineLoadErrorDetail loadMore rejected or returned invalid items: { error }. Re-emits aui-load-error.

Call them through a viewChild query or a template reference.

Method Description
setExpanded(expanded: boolean): void Show or collapse older items (no event).
loadOlder(): Promise<void> | undefined Run loadMore as the ‘Load older’ button does.

Pattern: Structured content: an ordered list of events (day groups as list items with a heading and a nested ordered list); native links and buttons for actions; a horizontal timeline is a focusable, labelled scroll region.

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Timeline: Accessibility and performance.