Install the core library and render your first timeline.
<script src="https://unpkg.com/@tempis/timeline/dist/tempis_timeline.min.js"></script>
tempis_timeline object. Access the constructor via tempis_timeline.TempisTimeline.import { TempisTimeline } from '@tempis/timeline';
const timeline = new TempisTimeline('#canvas', {
responsive: true,
items: [
{ id: 1, label: 'Item 1', start: '2026-01-05', end: '2026-01-15', grouping: 'Group 1' },
{ id: 2, label: 'Item 2', start: '2026-01-12', end: '2026-01-28', grouping: 'Group 1' },
{ id: 3, label: 'Event 1', start: '2026-01-30', grouping: 'Group 1' },
{ id: 4, label: 'Item 3', start: '2026-01-08', end: '2026-01-25', grouping: 'Group 2' },
],
range: { start: '2026-01-01', end: '2026-02-01', position: 'bottom' }
});
responsive: true, the canvas must be inside a container with explicit dimensions. The timeline resizes to fill its parent — if the parent has no width or height, the canvas will collapse to zero.<canvas id="my-timeline"></canvas>
<script src="https://unpkg.com/@tempis/timeline/dist/tempis_timeline.min.js"></script>
<script>
new tempis_timeline.TempisTimeline('#my-timeline', {
responsive: true,
items: [
{ id: 1, label: 'Item 1', start: '2026-01-05', end: '2026-01-15' }
],
range: { start: '2026-01-01', end: '2026-02-01', position: 'bottom' }
});
</script>
Now that you have a basic timeline rendering, explore these pages to build on it: