Skip to main content
Headers and footers that repeat on every page of a section.

Components


Basic usage

Header only

Both


Page numbers

The PageNumber component inserts dynamic page numbers.

Current page

Outputs: 1, 2, 3…

Total pages

Outputs the total page count.

Both (current of total)

Outputs: “Page 1 of 10”

Custom format

Outputs: “1 / 10”
Outputs: ”- 1 -“

Styling

Headers and footers support Tailwind classes and inherit text classes from their Section and Document. They accept the same content as a section: paragraphs, headings, tables, lists and images.

Right-aligned header

Multiple lines


Header/footer spacing

Control distance from page edge with margin options:

First and even pages

type chooses the pages a header or footer appears on:
A section may have one header and one footer of each type. When a section defines only some types, pages of the missing types use the default header or footer (Word itself would leave them blank).

Allowed content

Headers and footers accept the same content as a section: paragraphs, headings, lists, tables and images. Text classes on the Section and Document apply inside them.

Common patterns

Document title + page number

Company branding

Left and right aligned (using tabs)


Different headers per section

Each section has its own header/footer. Use multiple sections for different headers:

Full example