Download HistropediaJS

Free for personal, educational, and other non-commercial projects — install from npm, use the CDN, or download the zero-dependency bundle.

Choose Your Setup

Install the package, use the CDN, or download the bundle for self-hosted files.

Install from npm

Use the ESM package in modern bundlers and ESM-capable runtimes.

Shell
npm install histropediajs
JavaScript
import { Timeline } from 'histropediajs';

Choose this option for Vite, Webpack, Rollup, Parcel, or other build-tool based projects.

Free for Non-Commercial Use

By downloading and using this software, you acknowledge your understanding and acceptance of the HistropediaJS Non-Commercial Licence Agreement.

View Licence

Required to enable the download.

What's Inside

Everything you need to start building timelines, bundled into a .zip download.

histropediajs-1.6.1/
dist/ Production builds
UMD Use with <script> tags
  • histropedia.umd.min.js 222 kB ~64 kB gzip
  • histropedia.umd.js 480 kB ~94 kB gzip
ESM Use with modern bundlers
  • histropedia.esm.js 444 kB ~91 kB gzip
TS TypeScript definitions
  • histropedia.esm.d.ts TypeScript definitions
demo/ Working examples

Complete UMD and ESM examples with shared data — copy, paste, and customize.

What's New

Highlights from the latest release. For full notes, see the links below or the change log.

Version 1.6.1 5th Sep 2026

Fixes

  • Time-aware date parts. Date-part objects containing hours, minutes, seconds, or milliseconds now infer the appropriate precision when you do not specify one; date-only values still default to day precision, and an explicit setting always wins.
  • Automatic height fitting after option changes. With auto-fit enabled, changing reserved vertical space through timeline.setOption(...)—including parent date-label visibility or height—now refits stacked articles before redraw, with no manual fitToHeight() call needed.
Version 1.6.0 4th Sep 2026

Highlights

  • Timelines down to the millisecond. Add hours, minutes, seconds, and milliseconds to your data, then jump straight to an exact moment. Existing timelines keep their familiar day-level zoom unless you choose to enable the closer scales.
  • Clearer dates at every scale. Optional sticky and parent labels help people keep track of the wider date context.
  • More visual control. Style the main timeline with a solid colour or gradient, customise article date indicators, choose your chart palette, and control chart grid lines.
  • Easier custom card layouts. Custom layouts, available since v1.3.0, now have more predictable styling and simpler tools for drawing cards and handling their interactive areas.
  • More reliable rendering. Charts remain visible with extremely distant data, and card connectors stay crisp and correctly aligned across display and pixel-snapping modes.
  • More dependable date calculations. Dmy objects retain their chosen precision during calculations and correctly update the day of year after their date fields are edited.
Version 1.5.1 28th Jul 2026

Highlights

  • Elastic date-bound dragging. Prevents viewport jumps when a pinch gesture returns to a single-pointer drag.
Version 1.5.0 14th Jul 2026

v1.5.0 release blog post

Highlights

  • Timeline charts. Add line and area chart layers aligned to the timeline date scale.
  • Date bounds. Constrain the visible viewport with optional minimum and maximum dates.
  • String option selectors. Use descriptive values such as 'month', 'all', and 'screen' for precision, density, and stacking range.
  • Improved start-date navigation. Use timeline.setStartDate(date, { padding, animation }) for padded or animated jumps.
  • Settled state-change events. timeline-state-change now fires after meaningful interactions settle, reducing save-handler noise.
  • Date normalization fixes. Plain date objects now default missing month/day values without mutating caller input.
Version 1.4.0 29th Apr 2026

v1.4.0 release blog post

Highlights

  • Multi-lane timelines. Organize events into separate horizontal lanes while sharing one bottom timeline axis.
  • Lane layout and reordering APIs. Add, style, hide, show, and reorder lanes at runtime.
  • Date range fitting. Use timeline.fitDateRange(start, end, options) to fit a supplied period into the viewport.
  • Pan momentum and smoother wheel zooming. Drag and notched wheel interactions feel more responsive by default.
  • Responsive baseline distance and card layout breakpoints. Adapt article spacing and card layout to the available height.
  • Simplified download bundle. UMD, minified UMD, ESM, and one TypeScript definitions file.
Version 1.3.3 4th Feb 2026

Fixes

  • Time Band opacity bleed. Resets the canvas globalAlpha at the start of each Time Band draw so the overlay does not inherit the last rendered article's fade opacity when it has no image.
Version 1.3.2 25th Jan 2026

Fixes

  • Legacy event handler this context. Preserves the timeline instance as this inside legacy event handlers to maintain backward compatibility.
Version 1.3.1 18th Dec 2025

Fixes

  • HiDPI shadows. Aligns shadow dimensions with the canvas DPR for consistent size on high-density displays.
  • Card border toggles. Prevents landscape cards from drawing borders when border width is set to 0.
  • Card height refresh. Recalculates card height when border width changes to fix bottom alignment.
Version 1.3.0 4th Dec 2025

v1.3.0 release blog post

Highlights

  • Zero dependencies. Now only a single HistropediaJS file required.
  • Card layouts. Landscape layout and the ability to register custom layouts.
  • Time Bands. Highlight and label different time periods on the timeline.
  • Event system. New EventManager API with 18 events.
  • HiDPI support. Configurable high-resolution canvas rendering.
  • Image loading. Redesigned loader and cache for a massive performance boost.
  • Zoom options. Smooth trackpad scrolling with automatic detection.
  • TypeScript. Full type definitions for IDE autocompletion and type safety.