Dots

Document Paper

A sheet of paper for official documents such as account letters, statements, and confirmations.

No. 2041-778111 Nov 2026

Account confirmation letter

We confirm that Alex Morgan holds a current account with us. The account is open and in good standing on the date of this letter.

This letter is issued at the request of the account holder.

Account holder
Alex Morgan
Account number
4021 7781 0093
Currency
US dollar (USD)
Balance on 11 Nov 2026
$12,480.50
Jordan LeeHead of operations
Signed electronically11 Nov 2026, 14:32 UTC
D-2041-7781Scan the code or enter it at example.com/verify to check this document.
Example Financial Ltd, 221 Market Street, San Francisco, CAPage 1 of 1
"use client"

import {

The DocumentPaper component lays out an official document: an account confirmation letter, a statement, a transfer confirmation, or a fee report. It follows the theme on screen and prints black on white, with table headings that repeat on every printed page. Use it when the screen shows a document people will download, print, or hand to someone else. For key and value pairs inside the app, such as transfer details in a sheet, pick Key Value instead.

Installation

pnpm dlx shadcn@latest add @dots/document-paper

Usage

import {
  DocumentPaper,
  DocumentPaperBody,
  DocumentPaperFooter,
  DocumentPaperHeader,
  DocumentPaperMeta,
  DocumentPaperRow,
  DocumentPaperSignature,
  DocumentPaperTable,
  DocumentPaperTitle,
} from "@/components/ui/document-paper"
<DocumentPaper>
  <DocumentPaperHeader>
    <Logo />
    <DocumentPaperMeta>
      <span>No. 2041-7781</span>
      <span>11 Nov 2026</span>
    </DocumentPaperMeta>
  </DocumentPaperHeader>
  <DocumentPaperTitle>Account confirmation letter</DocumentPaperTitle>
  <DocumentPaperBody>
    <p>We confirm that Alex Morgan holds a current account with us.</p>
  </DocumentPaperBody>
  <DocumentPaperTable>
    <DocumentPaperRow label="Account holder">Alex Morgan</DocumentPaperRow>
  </DocumentPaperTable>
  <DocumentPaperSignature name="Jordan Lee" position="Head of operations" />
  <DocumentPaperFooter>
    <span>Page 1 of 1</span>
  </DocumentPaperFooter>
</DocumentPaper>

Composition

Use the following composition to build a document. Every part is optional except the paper itself; keep them in this order.

DocumentPaper
├── DocumentPaperHeader
│   └── DocumentPaperMeta
├── DocumentPaperTitle
├── DocumentPaperBody
├── DocumentPaperTable
│   └── DocumentPaperRow
├── DocumentPaperTotals
│   └── DocumentPaperTotal
├── DocumentPaperLines
│   ├── DocumentPaperLinesHeader
│   │   └── DocumentPaperLinesRow
│   │       └── DocumentPaperLinesHead
│   ├── DocumentPaperLinesBody
│   │   └── DocumentPaperLinesRow
│   │       └── DocumentPaperLinesCell
│   │           └── DocumentPaperNote
│   └── DocumentPaperLinesFooter
│       └── DocumentPaperLinesRow variant="total"
├── DocumentPaperSignature
├── DocumentPaperVerify
└── DocumentPaperFooter

Features

  • Follows the theme on screen and prints black on white
  • The title names the whole document for assistive tech
  • Key and value rows with alternating fills instead of rules, mono digits, and notes
  • Summary tiles that sit in one row on wide paper and two by two on narrow paper
  • Multi-column lines that stack into two columns on narrow paper and go back to a native table in print
  • Group headings and a total row, with column headings repeated on every printed page
  • An electronic signature pill and a verification QR code with a typed code

Table

Use DocumentPaperTable with DocumentPaperRow for details such as the account holder and account number. Set mono on numbers people copy or compare, emphasis on the one figure that matters, and note or valueNote for a second line under the label or value.

Transfer confirmation

From
Alex MorganExample Financial Ltd
To
Sam RiveraBank of Example, London
Reference
TX-88213
ChargesWho pays the bank fees
Shared
Fee
$2.50
Amount
$250.00
"use client"

import {

Totals

Use DocumentPaperTotals for two to four summary figures, such as the opening and closing balance of a statement. Mark the one figure the document is about with main.

Account statement, 1 to 10 Nov 2026

Opening balance
$8,240.25
Money in
+$1,200.001 operation
Money out
-$1,704.803 operations
Closing balance
$7,735.45
"use client"

import {

Lines

Use DocumentPaperLines for operations with several columns. Pass a CSS grid template in columns and set align="end" on numeric columns. Below 28rem of paper width, each row stacks into two columns: start cells on the left, end cells on the right. Give the table an aria-label.

Operations

DateDescriptionAmountBalance
02 NovTransfer from Sam RiveraRef. TX-88102+$1,200.00$9,440.25
04 NovCoffee PointCard ending 3092-$4.80$9,435.45
06 NovMonthly rentStanding order-$1,450.00$7,985.45
09 NovTransfer to Jordan LeeRef. TX-88213-$250.00$7,735.45
"use client"

import {

Groups

Put one DocumentPaperLinesBody per group so the fills restart under each heading. A group heading is a row with variant="group" and one DocumentPaperLinesHead with scope="rowgroup" and a colSpan. Close the table with a variant="total" row inside DocumentPaperLinesFooter, which prints once after the last line.

Fees paid in 2026

ServiceTimesFee
Payments
Transfers by username148$0.00
International transfers$2.50 each6$15.00
Cards
Currency conversion0.5% of $7,640.0041$38.20
ATM withdrawals$2.00 each9$18.00
Total fees paid204$71.20
"use client"

import {

Signature and verification

DocumentPaperSignature shows the signer and a pill that says the document is signed electronically. DocumentPaperVerify shows a small QR code that opens value, and a code people can type in instead of scanning.

<DocumentPaperSignature
  name="Jordan Lee"
  position="Head of operations"
  signedAt="11 Nov 2026, 14:32 UTC"
/>
<DocumentPaperVerify
  value="https://example.com/verify/D-2041-7781"
  code="D-2041-7781"
>
  Scan the code or enter it at example.com/verify to check this document.
</DocumentPaperVerify>

Accessibility

DocumentPaper renders semantic HTML, so the structure is read the same on screen and in print.

  • The paper is an <article> named by DocumentPaperTitle while a title is mounted
  • DocumentPaperTable and DocumentPaperTotals are description lists (<dl>), so each label is read with its value
  • DocumentPaperLines keeps table roles while the rows are restyled, and the column headings stay available to screen readers when they are hidden on narrow paper
  • Group headings are row headers for the rows under them

Set the heading level

DocumentPaperTitle renders an <h2> by default. Set headingLevel to fit the page outline, for example 1 when the document is the whole page.

<DocumentPaperTitle headingLevel={1}>Account statement</DocumentPaperTitle>

Label the lines and the QR code

Give each DocumentPaperLines an aria-label, such as "Operations". DocumentPaperVerify names its QR code "QR code to verify this document" by default; pass label to change it. Always keep the typed code so people who can't scan can still check the document.

Keep the issuer mark decorative

The mark in DocumentPaperHeader is usually decorative. Hide it with aria-hidden, or give an <img> an alt with the issuer's name.

API Reference

DocumentPaper

The paper. Renders an <article>.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the paper.
...propsReact.ComponentProps<"article">-Props spread to the <article>.

DocumentPaperHeader

The top row: the issuer mark on the start side, DocumentPaperMeta on the end side. Renders a <header>.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the header.
...propsReact.ComponentProps<"header">-Props spread to the <header>.

DocumentPaperMeta

The document number and date, one per line, in mono.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the meta.
...propsReact.ComponentProps<"div">-Props spread to the <div>.

DocumentPaperTitle

The document's name. It also names the paper.

PropTypeDefaultDescription
headingLevel1 | 2 | 32Heading level in the page outline.
idstringgeneratedThe heading id.
...propsReact.ComponentProps<"h2">-Props spread to the heading.

DocumentPaperBody

Running text. Paragraphs inside get even spacing.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the body.
...propsReact.ComponentProps<"div">-Props spread to the <div>.

DocumentPaperTable

Key and value pairs. Renders a <dl>.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the table.
...propsReact.ComponentProps<"dl">-Props spread to the <dl>.

DocumentPaperRow

One label and value pair.

PropTypeDefaultDescription
labelReact.ReactNode-The label. Required.
childrenReact.ReactNode-The value. Required.
noteReact.ReactNode-Second line under the label.
valueNoteReact.ReactNode-Second line under the value.
monobooleanfalseMono digits for numbers people copy or compare.
emphasisbooleanfalseWeight 600 for the one figure that matters.
classNamestring-Additional classes to apply to the row.
...propsReact.ComponentProps<"div">-Props spread to the root <div>, except children.

DocumentPaperNote

A small muted line under a label, value, or cell.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the note.
...propsReact.ComponentProps<"span">-Props spread to the <span>.

DocumentPaperTotals

Summary tiles for two to four figures. Renders a <dl>.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the totals.
...propsReact.ComponentProps<"dl">-Props spread to the <dl>.

DocumentPaperTotal

One summary figure.

PropTypeDefaultDescription
labelReact.ReactNode-The label. Required.
childrenReact.ReactNode-The figure, usually a MoneyAmount with size="inline". Required.
noteReact.ReactNode-Line under the figure, such as "12 operations".
mainbooleanfalseThe one figure the document is about. Only one per block.
classNamestring-Additional classes to apply to the tile.
...propsReact.ComponentProps<"div">-Props spread to the root <div>, except children.

DocumentPaperLines

A table of document lines.

PropTypeDefaultDescription
columnsstring-CSS grid template for the columns on screen. Equal columns when left out.
classNamestring-Additional classes to apply to the table.
...propsReact.ComponentProps<"table">-Props spread to the <table>.

DocumentPaperLinesHeader, DocumentPaperLinesBody, DocumentPaperLinesFooter

The column headings, a group of lines, and the total row. Render <thead>, <tbody>, and <tfoot> and accept all of their props.

DocumentPaperLinesRow

PropTypeDefaultDescription
variant"line" | "group" | "total""line"An ordinary line, a group heading, or the closing total.
classNamestring-Additional classes to apply to the row.
...propsReact.ComponentProps<"tr">-Props spread to the <tr>.

DocumentPaperLinesHead

A column heading, or a row heading with scope="row" or scope="rowgroup".

PropTypeDefaultDescription
align"start" | "end""start""end" for numbers: right-aligned and on the end side when rows stack.
scopestring"col"The heading scope.
...propsReact.ComponentProps<"th">-Props spread to the <th>.

DocumentPaperLinesCell

PropTypeDefaultDescription
align"start" | "end""start""end" for numbers: right-aligned, no wrapping.
monobooleanfalseMono digits for references and card numbers.
mutedbooleanfalseMuted text for secondary columns such as the date or balance.
emphasisbooleanfalseWeight 600.
...propsReact.ComponentProps<"td">-Props spread to the <td>.

DocumentPaperSignature

PropTypeDefaultDescription
nameReact.ReactNode-Who signed. Required.
positionReact.ReactNode-Their job title.
signedAtReact.ReactNode-When it was signed, already formatted.
signedLabelstring"Signed electronically"Text of the signature pill.
classNamestring-Additional classes to apply to the signature.
...propsReact.ComponentProps<"div">-Props spread to the root <div>, except children.

DocumentPaperVerify

PropTypeDefaultDescription
valuestring-Link the code opens to check the document. Required.
codestring-Code people can type in instead of scanning. Required.
labelstring"QR code to verify this document"Accessible name of the QR code.
childrenReact.ReactNode-How to check the document.
classNamestring-Additional classes to apply to the block.
...propsReact.ComponentProps<"div">-Props spread to the root <div>. children is the text above.

DocumentPaperFooter

Small print at the bottom: issuer details, page number, legal notes. Renders a <footer>.

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the footer.
...propsReact.ComponentProps<"footer">-Props spread to the <footer>.