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 v1.8.0 from npm, use the CDN, or download the bundle.

Install from npm

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

Shell
npm install [email protected]
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

Files included in the self-hosted download.

histropediajs-1.8.0.zip
dist/ Production builds
UMD Use with <script> tags
  • histropedia.umd.min.js 268 kB ~79 kB gzip
  • histropedia.umd.js 574 kB ~115 kB gzip
ESM Use with modern bundlers
  • histropedia.esm.js 528 kB ~112 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

Release highlights and examples. Read the full changelog for all changes.

Version 1.8.0
  • Viewport image loading. Choose which cards request images, set a preload margin, and track loads, failures and idle periods.
  • Input control and hit testing. Pause drag, pinch and wheel input at runtime. Find the card under a pointer even while controls are paused.
  • Fitted row spacing. Cap the gap between rows across a timeline or in a single lane.
  • Timeline teardown. Call destroy() when an embedded timeline is removed to release listeners, animations, images and generated DOM.
  • Dragging. Panning groups pointer moves into one layout update per animation frame. Dragging a selected card repaints its new position without recalculating the timeline layout.
  • Portrait card text. Hovering or selecting a card with a thicker border keeps its text in place. Automatic text blocks also make room for tall accents and deep descenders. Card sizing details.
  • Large timelines. Period lines need fewer overlap checks for start-sorted data. Density groups and stacked area charts use less working memory.

Check style reads, compact data, article ordering and image host settings in the v1.8 upgrade guide.

Try the image events

Version 1.7.0 27th Oct 2026

v1.7.0 release blog post

Features and improvements

  • Ready-to-use card presets. Choose title-only, title-subtitle, label, image-text, image-only, or pill cards, and extend existing layouts with your own styles or drawing hooks.
  • Flexible card sizing. Automatic widths, width caps, shared card and text-block heights, multi-line subtitles, padding, and per-side image margins support more card designs.
  • Clear configuration overrides. Use Histropedia.UNSET to restore applicable defaults and inherited values through public setters.
  • Navigation completion. Use onComplete after the final viewport draw, including immediate fits. Replaced or interrupted navigation cancels pending callbacks.
  • Connector styling. Control line and arrow colours, dashes, line caps, and visibility independently.
  • Touchscreen momentum. Pinch zoom and midpoint pan glide after release, with configurable inertia and improved pinch-to-pan handoff.
  • Rendering and priority fixes. Less repeated redraw work, better text truncation, bounded star hit areas, and explicit selected-over-starred-over-normal article priority.

Existing card configurations may render differently. See the sizing migration notes and the full changelog.

Explore card presets and sizing

Version 1.6.2 23rd Sep 2026

Fixes

  • Accurate BCE article fitting. fitArticleRange() and fitArticles() now keep stored BCE article dates aligned during immediate and animated fits.
  • Consistent BCE precision ranges. Decades now follow historical tens, including the shorter 9–1 BCE and 1–9 CE boundary periods. BCE million- and billion-year dates resolve to their containing periods.
  • Accurate parent context. The optional parent row now labels boundary decades as 9–1 BCE and 1–9, and hands sticky labels over at the correct year.

Explore BCE precision boundaries

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

v1.6.0 release blog post

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.