DocumentPage
DocumentPage — a page that reads like a document: an optional cover across the top, an icon, a large title and the body in a centred reading column, as in a notebook app. The page template for writing (notes, a journal entry, a guide, a lesson); the record page's `document` template uses it. ```tsx <DocumentPage cover="/covers/ocean.jpg" icon="🌊" title="Trip notes" subtitle="Edited 2 days ago" actions={<Button variant="ghost" size="sm">Share</Button>} > <RichText value={doc.body} /> </DocumentPage> ``` The cover bleeds to the page area's edges (it undoes AppShell's content padding with negative margins on the sides and top), and the icon overlaps its bottom edge. Everything else sits in one column, centred, so long text keeps a readable line length on a wide screen. Parts: `document-page` (with `data-width`), `document-page-cover`, `document-page-icon` and `document-page-title`, which reads the page-title tokens like the other page templates. This is a **layout**: it positions a cover, a header and a body and never fetches the document.
packages/ui/src/components/layout/document-page.tsx
@marktiderman/genesis-ui/layoutimport { DocumentPage } from "@marktiderman/genesis-ui/layout";react-docgen-typescript.DocumentPage
DocumentPage — a page that reads like a document: an optional cover across the top, an icon, a large title and the body in a centred reading column, as in a notebook app. The page template for writing (notes, a journal entry, a guide, a lesson); the record page's `document` template uses it. ```tsx <DocumentPage cover="/covers/ocean.jpg" icon="🌊" title="Trip notes" subtitle="Edited 2 days ago" actions={<Button variant="ghost" size="sm">Share</Button>} > <RichText value={doc.body} /> </DocumentPage> ``` The cover bleeds to the page area's edges (it undoes AppShell's content padding with negative margins on the sides and top), and the icon overlaps its bottom edge. Everything else sits in one column, centred, so long text keeps a readable line length on a wide screen. Parts: `document-page` (with `data-width`), `document-page-cover`, `document-page-icon` and `document-page-title`, which reads the page-title tokens like the other page templates. This is a **layout**: it positions a cover, a header and a body and never fetches the document.
| Prop | Type | Default | Description |
|---|---|---|---|
| title* | ReactNode | — | Page title. Rendered as the page's single `<h1>`. |
| actions | ReactNode | — | Controls for the whole document (Share, a menu), at the end of the title row. |
| cover | ReactNode | — | A cover across the top: an image URL (drawn as a decorative, cropped image) or any node (a `Band`, a gradient, your own image). Omit it and the page starts at the icon or the title. |
| icon | ReactNode | — | The page's icon above the title: an emoji, an `<img>` or an icon. Overlaps the cover's bottom edge when there is a cover. |
| subtitle | ReactNode | — | A line under the title: an author, a date, where it sits. |
| testID | string | — | Stable test/automation selector (emitted as `data-testid`). |
| width | enum | reading | The reading column's width: `reading` (default, about 70 characters a line) or `full` (the page's width, for tables and boards in the body). |