html2canvas
JavaScript library for taking screenshots of web pages and rendering HTML to canvas.
Files, images and media npm MIT
Used in agent projects
115
0.9% of 12,697 public repos built with AI coding agents
Rank in files, images and media
#7 of 52
by use in those projects
Downloads
18.5M
npm, last 7 days, html2canvas
GitHub stars
31.9K
last push Jul 18, 2024
How html2canvas is used
html2canvas is a dependency in 115 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (0.9%), #7 of 52 in files, images and media. The most used alternative there is Sharp. Projects that use it most often also use Lucide React (77.4%), jsPDF (64.3%), Tailwind Merge (63.5%).
Often used with html2canvas
| Lucide React | 77.4% of html2canvas projects · 3.9× more than average |
|---|---|
| jsPDF | 64.3% of html2canvas projects · 44.4× more than average |
| Tailwind Merge | 63.5% of html2canvas projects · 3.8× more than average |
| clsx | 61.7% of html2canvas projects · 3.5× more than average |
| Class Variance Authority | 53.0% of html2canvas projects · 3.8× more than average |
| Tailwind CSS | 83.5% of html2canvas projects · 2.4× more than average |
| Radix UI | 48.7% of html2canvas projects · 4.1× more than average |
| Recharts | 48.7% of html2canvas projects · 6.0× more than average |
By coding agent
| Claude Code | 1.5% of projects set up for it |
|---|---|
| GitHub Copilot | 1.4% of projects set up for it |
| Cursor | 1.4% of projects set up for it |
| Devin Desktop | 3.3% of projects set up for it |
| Gemini CLI | 1.8% of projects set up for it |
| OpenCode | 1.9% of projects set up for it |
Share of public repos configured for each agent that list html2canvas as a dependency.
Install
| Package | npm install html2canvas |
|---|---|
| Main stacks | Next.js (58), TypeScript / JavaScript (53), Python (4) |
| Example projects | ding113/claude-code-hub, 1600822305/AetherLink, ilmoi/nft-armory, ilmoi/nftape.me, fountain-ink/app |
Alternatives to html2canvas
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Sharp npm High-speed image processing for resizing, converting JPEG, PNG, WebP, GIF formats. |
390 (3.1%) | 115M | 32.7K | Apache-2.0 |
| Pillow pypi Python imaging library for image processing, manipulation and conversion. |
292 (2.3%) | 138M | 13.9K | — |
| Nodemailer npm Send emails from Node.js applications with support for multiple transport methods. |
232 (1.8%) | 25.2M | 17.7K | MIT-0 |
| jsPDF npm Generate PDF documents directly from JavaScript in browsers and Node.js. |
184 (1.4%) | 15.6M | 31.3K | MIT |
| qrcode (JavaScript) npm Generate QR codes on server and client using canvas with Node.js and browser support. |
163 (1.3%) | 29.7M | 8,178 | MIT |
| SheetJS npm Parse and generate spreadsheets (Excel, CSV) in Node.js and browsers. |
146 (1.1%) | 12.7M | 36.3K | Apache-2.0 |
| JSZip npm JavaScript library for creating, reading and editing ZIP archives in the browser. |
96 (0.8%) | 47.5M | 10.4K | (MIT OR GPL-3.0-or-later) |
| openpyxl pypi Python library for reading and writing Excel 2010 XLSX/XLSM files. |
88 (0.7%) | 71.8M | — | MIT |