# timmywil/panzoom

A library for panning and zooming elements using CSS transforms :mag:

Repository: https://github.com/timmywil/panzoom
Canonical: https://ross.abutalabs.com/products/panzoom
Homepage: https://timmywil.com/panzoom/
Language: TypeScript
License: MIT
License Family: permissive
Topics: pan, zoom, panzoom, pointer-events, svg, typescript, css
Last push: 2026-07-02T00:49:20+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 45, longevity 100
- inputs: {"age_days": 4920, "days_push": 63, "days_rel": 153, "gap_med": 221.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2456, forks 417 (observed 2026-08-28T04:06:53.198083+00:00)

## What it is
Panzoom is a small (~3.7kb gzipped) TypeScript library that adds panning and zooming to any DOM element using GPU-accelerated CSS transforms. It supports pointer events, touch/pinch gestures, mousewheel focal-point zooming, and direct SVG element manipulation.

## Use cases
- pan and zoom images in the browser
- add pinch-to-zoom to a mobile web page
- make an SVG pannable and zoomable
- implement a draggable canvas or map viewer
- zoom any element with the mouse wheel
- build an image viewer with pan and zoom controls

## When to choose
- you need lightweight pan/zoom for arbitrary HTML or SVG elements
- you want GPU-accelerated transforms instead of layout-based positioning
- you need touch and pinch gesture support on mobile and desktop
- you want fine-grained control like focal-point zoom, containment, and event hooks

## When to avoid
- you need full image-viewer UI with thumbnails, lightbox, or gallery features
- you're working outside the browser (Node, native apps)
- you need IE11 CSS transition support on SVG elements
- you need WebGL-based zooming for very large images or deep-zoom tile formats

## Facets
- artifact type: library
- maturity: active
- function: animation, ui-components
- domain: frontend, web-development
- platform: browser, cross-platform
- tags: pan, zoom, css-transforms, pointer-events, svg, touch-gestures, pinch-zoom, typescript, mobile

## Member repositories
- timmywil/panzoom (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:53.198083+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:30:04.438996+00:00, confidence not recorded.
  - readme: https://github.com/timmywil/panzoom (fetched 2026-08-28T04:06:53.198083+00:00, sha 7abf0fc695c1)
  - homepage: https://timmywil.com/panzoom/ (fetched 2026-08-29T10:11:23.938944+00:00, sha fb727a551a02)
- Data as of 2026-08-30T08:39:29.467469+00:00.
