A data-driven timeline of events. Bind [items] and the component renders a marker, title, description and an opposite-side timestamp for each one. Layout is configurable via orientation, align, reverse and selectable; every region can be overridden with a structural template directive (*bsTimelineMarker, *bsTimelineContent, *bsTimelineTimestamp). Items can also be authored declaratively as <bs-timeline-item> children.
Toggle each input below with a <bs-select> or <bs-checkbox> and watch the single live timeline — and the copyable snippet beneath it — update to match.
single or multiple. With none it renders as a plain list — the items carry no tabindex and take no focus. multiple, adds or removes the focused item; with single it behaves like Entermultiple, adds every enabled item between the anchor and the focused item
<bs-timeline [items]="milestones()">
<small *bsTimelineTimestamp="let item = item">{{ item.time }}</small>
</bs-timeline>
import { Component, model, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BsCheckboxComponent } from '@mintplayer/ng-bootstrap/checkbox';
import { BsSelectComponent, BsSelectOption } from '@mintplayer/ng-bootstrap/select';
import { BsCardComponent, BsCardHeaderComponent, BsCardBodyComponent, BsCardTextComponent, BsCardFooterComponent }
from '@mintplayer/ng-bootstrap/card';
import {
BsTimelineComponent, BsTimelineMarkerDirective, BsTimelineContentDirective,
BsTimelineTimestampDirective, BsTimelineItemComponent, BsTimelineItemOppositeDirective, type TimelineItem,
} from '@mintplayer/ng-bootstrap/timeline';
@Component({
selector: 'my-roadmap',
templateUrl: './my-roadmap.component.html',
imports: [
FormsModule, BsCheckboxComponent, BsSelectComponent, BsSelectOption,
BsCardComponent, BsCardHeaderComponent, BsCardBodyComponent, BsCardTextComponent, BsCardFooterComponent,
BsTimelineComponent, BsTimelineMarkerDirective, BsTimelineContentDirective,
BsTimelineTimestampDirective, BsTimelineItemComponent, BsTimelineItemOppositeDirective,
],
})
export class MyRoadmapComponent {
milestones = signal<TimelineItem[]>([
{ id: 'kickoff', title: 'Kickoff', description: 'Project scoping.', time: '2026-01-10', icon: 'bi bi-flag', color: '#6c757d' },
{ id: 'ship', title: 'Shipped v1', description: 'First public release.', time: '2026-05-01', icon: 'bi bi-rocket-takeoff', color: '#198754' },
]);
orientation = model<'vertical' | 'horizontal'>('vertical');
align = model<'start' | 'end' | 'alternate' | 'alternate-reverse'>('start');
selectable = model<'none' | 'single' | 'multiple'>('none');
reverse = model(false);
selected = model<readonly string[]>([]);
}
Instead of binding [items], drop <bs-timeline-item> children directly inside <bs-timeline> and project into the named slots (*bsTimelineItemOpposite; the item's own content is its body). Handy when each item's markup is bespoke rather than uniform.
<!-- Declarative: <bs-timeline-item> children, no [items] -->
<bs-timeline align="alternate">
<bs-timeline-item itemId="kickoff" color="#6c757d">
<small *bsTimelineItemOpposite>2026-01-10</small>
<bs-card>
<bs-card-header>Kickoff</bs-card-header>
<bs-card-body>
<bs-card-text class="mb-0">Project scoping and team assembly.</bs-card-text>
</bs-card-body>
<bs-card-footer><small class="text-body-secondary">2026-01-10</small></bs-card-footer>
</bs-card>
</bs-timeline-item>
<bs-timeline-item itemId="ship" color="#198754">
<small *bsTimelineItemOpposite>2026-05-01</small>
<bs-card>
<bs-card-header>Shipped v1</bs-card-header>
<bs-card-body>
<bs-card-text class="mb-0">First public release.</bs-card-text>
</bs-card-body>
<bs-card-footer><small class="text-body-secondary">2026-05-01</small></bs-card-footer>
</bs-card>
</bs-timeline-item>
</bs-timeline>