Add page numbers and custom footers to your documents
The Footer
component provides an easy way to add page numbers and custom footers to your documents. It’s built on top of the MarginBox component with additional features for page numbering.
Content to render in the footer. Can be either:
{ currentPage, totalPages }
elementsFooter position. Inherits all position options from MarginBox component.
Controls which pages the footer appears on.
Custom CSS classes to apply to the footer.
Custom inline styles for the footer content.
Custom styles applied to the MarginBox wrapper.
The default template shows “Page X of Y”:
Use the function-as-children pattern to customize the page number display:
Provide static content instead of page numbers: