
pdfcn
A collection of beautifully designed, accessible, and customizable PDF components for React. Built on Takumi and Forme, distributed via the shadcn CLI.

Overview
pdfcn is an open-source, customizable PDF component library for React by shadcn-labs. Following the renowned shadcn copy-and-paste philosophy, pdfcn transforms PDF document creation from a cumbersome chore into a familiar component-driven workflow. Built on top of Takumi and Forme, it empowers engineers to design, customize, and ship production-ready PDF reports, invoices, and certificates with zero vendor lock-in.
Key Features
- Dual Rendering Engines: Full support for both Takumi and Forme, providing consistent top-level React component APIs while retaining direct access to raw primitives.
- Copy & Paste Architecture: Powered by the shadcn registry format. Run a single CLI command to install clean, accessible components directly into your codebase.
- Pre-built Design Themes: Ships with curated typographic and color palettes (Professional, Modern, Minimal, Executive, Corporate, Blueprint) and an interactive theme builder.
- Production Blocks & Components: Ready-to-use business documents including commercial invoices, financial summaries, data tables, and signature blocks.
Installation & Quick Start
# Add a Takumi component via shadcn CLI
pnpm dlx shadcn@latest add @pdfcn/takumi/alert
# Or add a complete pre-built corporate invoice block (Forme engine)
pnpm dlx shadcn@latest add @pdfcn/forme/invoice-corporateimport { Document, Page } from "@/components/pdf/pdf-primitives";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import { Text } from "@/components/pdf/text";
import { Card } from "@/components/pdf/card";
import { Badge } from "@/components/pdf/badge";
export function InvoiceDocument() {
return (
<Document>
<Page size="A4">
<PdfcnThemeProvider theme="modern">
<Card className="p-6">
<Badge variant="success">Paid</Badge>
<Text variant="h1" className="mt-4">Invoice #INV-2026-001</Text>
<Text variant="muted">Thank you for your business. Summary of charges below.</Text>
</Card>
</PdfcnThemeProvider>
</Page>
</Document>
);
}Why Choose pdfcn?
- Developer Velocity: Generate polished PDF documents using the exact same declarative styling and component mental models you use across modern React applications.
- Total Code Ownership: Modify layout, typography, or styling rules directly without framework constraints or proprietary subscription traps.
Comments & Discussion
No comments yet. Be the first to share your experience or thoughts!
Related libraries
Curated by category & stackAmbient CSS
A physics-based lighting system for CSS calibrated against Blender raytraces. Define a light source, and all shadows, highlights, and gradients follow deterministically.
23rd
An open-source shadcn/ui registry of opinionated, tasteful components by radiumcoders — WebGL shaders, playful 404s, and interactive showpieces you copy, paste, and own.
Duolingo UI (ShadLingo)
A comprehensive Duolingo-inspired design system and component suite built on shadcn/ui v4 and Tailwind CSS, featuring signature 3D buttons, vivid owl-green tokens, and gamified interaction cards.