react-pdf-tailwind
Use Tailwind CSS classes to style PDFs built with react-pdf
react-pdf-tailwind converts a compatible subset of Tailwind CSS class syntax into style objects for react-pdf. You style PDF documents with the same classes as your web app. Version 3 uses Tailwind v4, so a v2 config needs an update. An interactive react-pdf playground shows it in use.
npm install react-pdf-tailwindUse it to keep invoice or report PDFs visually close to the web app. Only a subset of Tailwind works in PDF output, so test each class you need.
Why it is here. It lets one styling system cover both web pages and generated PDFs.
- Tailwind v4 support
- react-pdf playground
- 400+ GitHub stars
Verified 2026-10-09. HTTP 200. https://github.com/aanckar/react-pdf-tailwind (HTTP 200, page fetched 2026-10-09), https://github.com/aanckar/react-pdf-tailwind (GitHub API, 403 stars), depo.zip listing https://www.depo.zip/tools/j574q606fczk6chjsmry81b56d7t72g4








