A printable book on US Letter pages: an optional cover, an optional contents page that links to each section, then one section per page. It is dumb on purpose: it lays out what it is given and knows nothing about where the text comes from.

pnpm add @behivetech/templates.print-document

This is the snapshot of v0.1.1, the current version, as recorded on 2026-11-10. The live page runs its examples →

Examples of v0.1.1 are shown as code; only the latest version runs live. Open the live examples →

A cover, a contents page and two sections; each section starts a new page when printed.

Basic Print Document
1const BasicPrintDocument = () => (
2 <PrintDocument
3 cover={<h1>House guide</h1>}
4 toc="Contents"
5 runningTitle="The BEhive · House guide"
6 sections={[
7 {
8 id: "wifi",
9 title: "Wi-Fi",
10 content: <p>Ask the owner for the network details.</p>,
11 },
12 {
13 id: "trash",
14 title: "Trash",
15 content: <p>The bins go out on Tuesday evening.</p>,
16 },
17 ]}
18 />
19);
20
21render(<BasicPrintDocument />);

Without a cover or a contents heading it is just the sections, one per page.

Sections Only Print Document
1const SectionsOnlyPrintDocument = () => (
2 <PrintDocument
3 sections={[
4 { id: "arrival", title: "Arrival", content: <p>Check-in is at 4pm.</p> },
5 ]}
6 />
7);
8
9render(<SectionsOnlyPrintDocument />);