# niklasvh/html2canvas

Screenshots with JavaScript

Repository: https://github.com/niklasvh/html2canvas
Canonical: https://ross.abutalabs.com/products/html2canvas
Homepage: https://html2canvas.hertzen.com/
Language: TypeScript
License: MIT
License Family: permissive
Topics: javascript, screenshot, dom
Last push: 2024-07-18T07:26:56+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5528, "days_push": 776, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 31923, forks 4875 (observed 2026-08-28T04:11:57.273938+00:00)

## What it is
html2canvas is a JavaScript library that renders webpages or DOM elements as canvas images entirely in the browser, without server-side rendering. It rebuilds a visual representation by reading the DOM and applied CSS styles, so output may not be pixel-perfect and some CSS properties are unsupported.

## Use cases
- capture a screenshot of a webpage in the browser
- export a DOM element as a PNG image
- let users download a snapshot of a report or card
- render part of a page to canvas for sharing
- generate client-side page images without a server

## When to choose
- you need client-side page or element capture with no server rendering
- you want a lightweight (~45kb gzipped) MIT-licensed library
- your content is same-origin and uses well-supported CSS

## When to avoid
- you need pixel-perfect or full CSS fidelity
- you need to capture cross-origin content without a proxy
- you want to run it in Node.js (browser-only)
- you need production-grade stability for complex layouts

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, graphics
- domain: web-development, frontend
- platform: browser
- tags: screenshot, dom-rendering, canvas, client-side, html-renderer, javascript, nodejs

## Member repositories
- niklasvh/html2canvas (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:57.273938+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-29T16:52:13.273638+00:00, confidence not recorded.
  - readme: https://github.com/niklasvh/html2canvas (fetched 2026-08-28T04:11:57.273938+00:00, sha 5ecf30e7178b)
  - homepage: https://html2canvas.hertzen.com/ (fetched 2026-08-29T07:49:27.406522+00:00, sha a1a96d569c52)
  - site_page: https://html2canvas.hertzen.com/documentation (fetched 2026-08-29T07:49:27.410328+00:00, sha cdcafa17fefe)
  - registry_npm: https://registry.npmjs.org/html2canvas (fetched 2026-08-29T07:49:27.412086+00:00, sha e2ccd4963db3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
