# @types/jsx-pdf

> TypeScript definitions for jsx-pdf

Latest version **2.2.7** (published 2026-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/jsx-pdf
pnpm add @types/jsx-pdf
yarn add @types/jsx-pdf
bun add @types/jsx-pdf
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.2.7 |
| Published | 2026-01-28 |
| First published | 2020-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51433 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/jsx-pdf
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsx-pdf
- npm.io page: https://npm.io/package/@types/jsx-pdf

## Dependencies (1)

- [@types/pdfmake](https://npm.io/package/@types/pdfmake.md) ^0.2.0

## Recent versions

- 2.2.7 (latest) — 2026-01-28
- 2.2.6 (ts5.1) — 2023-11-21
- 2.2.2 (ts4.3) — 2021-07-08
- 2.2.5 — 2023-11-07
- 2.2.4 — 2023-10-18
- 2.2.3 — 2023-09-15
- 2.2.1 — 2020-11-12
- 2.2.0 — 2020-09-22

## README

# Installation
> `npm install --save @types/jsx-pdf`

# Summary
This package contains type definitions for jsx-pdf (https://github.com/schibsted/jsx-pdf#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsx-pdf.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsx-pdf/index.d.ts)
````ts
import * as PDFMake from "pdfmake/interfaces";

export function renderPdf(jsx: JSX.Element): PDFMake.TDocumentDefinitions;

export const Fragment: JSX.IntrinsicElements["stack"];

declare global {
    namespace JSX {
        // eslint-disable-next-line @typescript-eslint/no-empty-interface
        interface Element {}

        type Child = Element | Element[];

        type DynamicChild =
            | Child
            | ((currentPage: number, pageCount: number, pageSize: PDFMake.ContextPageSize) => Child);

        interface ElementChildrenAttribute {
            children: DynamicChild;
        }

        type Ele<Props = {}> = ElementChildrenAttribute & Props;

        type EleNoChidlren<Props = {}> = Props;

        interface IntrinsicElements {
            document: Ele<Omit<PDFMake.TDocumentDefinitions, "content" | "header" | "footer">>;
            header: Ele;
            footer: Ele;
            content: Ele;
            stack: Ele<Omit<PDFMake.ContentStack, "stack">>;
            text: Ele<Omit<PDFMake.ContentText, "text">>;
            ol: Ele<Omit<PDFMake.ContentOrderedList, "ol">>;
            ul: Ele<Omit<PDFMake.ContentUnorderedList, "ul">>;
            table: Ele<Omit<PDFMake.ContentTable, "table"> & Omit<PDFMake.Table, "body">>;
            row: Ele<Element>;
            cell: Ele<Element>;
            columns: Ele<Omit<PDFMake.ContentColumns, "columns">>;
            column: Ele<{ width: number | string }>;

            image: EleNoChidlren<Omit<PDFMake.ContentImage, "image"> & { src: string }>;
            qr: EleNoChidlren<Omit<PDFMake.ContentQr, "qr"> & { content: string }>;
            svg: EleNoChidlren<{
                content: string;
                width?: number | undefined;
                height?: number | undefined;
                fit?: [number, number] | undefined;
            }>;
        }
    }
}

````

### Additional Details
 * Last updated: Wed, 28 Jan 2026 19:06:34 GMT
 * Dependencies: [@types/pdfmake](https://npmjs.com/package/@types/pdfmake)

# Credits
These definitions were written by [Kyle Hensel](https://github.com/k-yle).

---
_Source: https://npm.io/package/@types/jsx-pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
