Skip to main content
Root element for every document. Contains one or more sections.

Props

PropTypeDescription
childrenReactNodeSection elements
stylesDocumentStylesDefault fonts and heading styles
metadataDocumentMetadataDocument metadata (title, author, etc.)
classNamestringTailwind classes (inherited by children)

Document styles

Configure default fonts and heading styles:

Font config

Heading config


Metadata

Embed metadata in the document’s core properties:

DocumentMetadata

All fields are optional. Only provided values are written to the file.

Style inheritance

Classes cascade to children:

Multiple sections

Each section can have different margins, page sizes, headers, and footers.