# MatthewHerbst/react-to-print

Print React components in the browser

Repository: https://github.com/MatthewHerbst/react-to-print
Canonical: https://ross.abutalabs.com/products/react-to-print
Homepage: https://www.npmjs.com/package/react-to-print
Language: TypeScript
License: MIT
License Family: permissive
Topics: reactjs, react, javascript
Last push: 2026-06-11T04:33:36+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 87, release rhythm 60, longevity 100
- inputs: {"age_days": 3195, "days_push": 83, "days_rel": 191, "gap_med": 49.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2475, forks 235 (observed 2026-08-28T04:06:54.977956+00:00)

## What it is
A React library that lets you print the content of React components directly from the browser via a hook-based API. It handles building the print window, copying styles and fonts, and provides lifecycle callbacks around the print dialog.

## Use cases
- print a React component from the browser
- add a print button to a React page
- generate printable invoices or reports from React UI
- print dynamic content with custom fonts
- control document title when saving print output as PDF

## When to choose
- you need to print specific React component content without leaving the browser
- you want a simple hook API with style/font handling and print lifecycle callbacks
- you need CSP nonce support or shadow DOM content in printed output

## When to avoid
- you need server-side PDF generation rather than browser printing
- your project is not React-based
- you need pixel-perfect print layouts beyond what CSS print styles offer

## Facets
- artifact type: library
- maturity: active
- function: ui-components, developer-tools
- domain: frontend, web-development, developer-tools
- platform: browser, cross-platform
- tags: react, printing, hooks, typescript, browser-printing, nodejs

## Member repositories
- MatthewHerbst/react-to-print (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:54.977956+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:28:22.661568+00:00, confidence not recorded.
  - readme: https://github.com/MatthewHerbst/react-to-print (fetched 2026-08-28T04:06:54.977956+00:00, sha 545474fe275f)
  - registry_npm: https://registry.npmjs.org/react-to-print (fetched 2026-08-29T10:10:24.447492+00:00, sha b6a0266f0da6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
