VERIFICATION-0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
| Reference | Status | Owner | Amount |
|---|---|---|---|
| INV-1042 | Needs review | Billing | $5,000 |
| INV-1043 | Ready | Billing | $2,750 |
<forma-dense-ledger>
Compact expert-work table with bounded overflow, stable relationships, and explicit text state.
<forma-dense-ledger>patterns/dense-ledger.htmlA dense ledger is a native table with tight cell padding, tabular numerals and ruled rows, meant for expert users who read many rows and compare values down columns. It keeps its table shape at every width: when the columns do not fit, the table scrolls inside an .forma-bounded-overflow region instead of recomposing into cards, so column relationships stay intact. Forma styles the table only; the rows, their order and the meaning of each state are application content.
font-variant-numeric: tabular-nums) keep digits aligned down a column.--forma-ledger-cell-space, so density can tighten without forking CSS..forma-bounded-overflow region provides containment.The smallest correct markup: the canonical pattern from patterns/dense-ledger.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
| Reference | Status | Owner | Amount |
|---|---|---|---|
| INV-1042 | Needs review | Billing | $5,000 |
| INV-1043 | Ready | Billing | $2,750 |
<forma-dense-ledger class="forma-component-tag">
<div class="forma-bounded-overflow" role="region" aria-label="Operational ledger" tabindex="0">
<table class="forma-dense-ledger">
<caption>Recent operational entries</caption>
<thead><tr><th scope="col">Reference</th><th scope="col">Status</th><th scope="col">Owner</th><th scope="col">Amount</th></tr></thead>
<tbody><tr><th scope="row">INV-1042</th><td>Needs review</td><td>Billing</td><td>$5,000</td></tr><tr><th scope="row">INV-1043</th><td>Ready</td><td>Billing</td><td>$2,750</td></tr></tbody>
</table>
</div>
</forma-dense-ledger>
Click or tap the code once to select all of it, then copy.
Reconciliation rows where some values are not yet known. Each gap is written as text (Unknown, Not recorded) instead of an empty cell or a dash, so an unknown amount is never read as zero.
| Reference | Bank amount | Ledger amount | Status |
|---|---|---|---|
| PAY-88120 | $1,250.00 | $1,250.00 | Matched |
| PAY-88121 | $980.40 | $908.40 | Mismatch: review |
| PAY-88122 | Unknown | $4,000.00 | Bank file pending |
| PAY-88123 | $75.00 | Not recorded | Missing ledger entry |
<forma-dense-ledger class="forma-component-tag">
<div class="forma-bounded-overflow" role="region" aria-label="Payment reconciliation" tabindex="0">
<table class="forma-dense-ledger">
<caption>Payment reconciliation, 29 September</caption>
<thead><tr><th scope="col">Reference</th><th scope="col">Bank amount</th><th scope="col">Ledger amount</th><th scope="col">Status</th></tr></thead>
<tbody>
<tr><th scope="row"><span class="forma-identifier">PAY-88120</span></th><td>$1,250.00</td><td>$1,250.00</td><td>Matched</td></tr>
<tr><th scope="row"><span class="forma-identifier">PAY-88121</span></th><td>$980.40</td><td>$908.40</td><td>Mismatch: review</td></tr>
<tr><th scope="row"><span class="forma-identifier">PAY-88122</span></th><td>Unknown</td><td>$4,000.00</td><td>Bank file pending</td></tr>
<tr><th scope="row"><span class="forma-identifier">PAY-88123</span></th><td>$75.00</td><td>Not recorded</td><td>Missing ledger entry</td></tr>
</tbody>
</table>
</div>
</forma-dense-ledger>
Click or tap the code once to select all of it, then copy.
Seven columns of audit entries. The table keeps its full width and the .forma-bounded-overflow region scrolls horizontally inside itself, so the page layout is not pushed wider. The region is focusable for keyboard scrolling.
| Entry | Time (UTC) | Actor | Action | Resource | Source address | Outcome |
|---|---|---|---|---|---|---|
| AUD-50311 | m.okafor | Role granted | billing/approvers | 10.40.12.7 | Allowed | |
| AUD-50312 | svc-export | Bulk export | customers/eu-west | 10.40.3.19 | Denied by policy | |
| AUD-50313 | j.lindqvist | Key rotated | payments/signing-key | 10.40.12.22 | Allowed |
<forma-dense-ledger class="forma-component-tag">
<div class="forma-bounded-overflow" role="region" aria-label="Access audit entries" tabindex="0">
<table class="forma-dense-ledger">
<caption>Access audit entries</caption>
<thead>
<tr><th scope="col">Entry</th><th scope="col">Time (UTC)</th><th scope="col">Actor</th><th scope="col">Action</th><th scope="col">Resource</th><th scope="col">Source address</th><th scope="col">Outcome</th></tr>
</thead>
<tbody>
<tr><th scope="row">AUD-50311</th><td><time datetime="2026-09-29T08:14:02Z">08:14:02</time></td><td>m.okafor</td><td>Role granted</td><td>billing/approvers</td><td>10.40.12.7</td><td>Allowed</td></tr>
<tr><th scope="row">AUD-50312</th><td><time datetime="2026-09-29T08:15:40Z">08:15:40</time></td><td>svc-export</td><td>Bulk export</td><td>customers/eu-west</td><td>10.40.3.19</td><td>Denied by policy</td></tr>
<tr><th scope="row">AUD-50313</th><td><time datetime="2026-09-29T08:16:11Z">08:16:11</time></td><td>j.lindqvist</td><td>Key rotated</td><td>payments/signing-key</td><td>10.40.12.22</td><td>Allowed</td></tr>
</tbody>
</table>
</div>
</forma-dense-ledger>
Click or tap the code once to select all of it, then copy.
A ledger in a narrow side panel sets --forma-ledger-cell-space to a smaller spacing token on the table. Density changes only padding; text size and numerals are unchanged.
| Reference | Amount | By |
|---|---|---|
| ADJ-201 | −$120.00 | Billing |
| ADJ-202 | $45.50 | Support |
| ADJ-203 | $0.00 | Billing |
<forma-dense-ledger class="forma-component-tag">
<div class="forma-bounded-overflow" role="region" aria-label="Recent adjustments" tabindex="0">
<table class="forma-dense-ledger" style="--forma-ledger-cell-space: var(--forma-primitive-spacing-1, 0.25rem)">
<caption>Recent adjustments</caption>
<thead><tr><th scope="col">Reference</th><th scope="col">Amount</th><th scope="col">By</th></tr></thead>
<tbody>
<tr><th scope="row">ADJ-201</th><td>−$120.00</td><td>Billing</td></tr>
<tr><th scope="row">ADJ-202</th><td>$45.50</td><td>Support</td></tr>
<tr><th scope="row">ADJ-203</th><td>$0.00</td><td>Billing</td></tr>
</tbody>
</table>
</div>
</forma-dense-ledger>
Click or tap the code once to select all of it, then copy.
Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.
The same five-column ledger at phone width. Columns keep their order and alignment; the region scrolls sideways inside its own bounds.
.forma-bounded-overflow region scrolls horizontally, so the page itself has no horizontal overflow at 320px.overscroll-behavior: contain stops a sideways swipe inside the ledger from scrolling the page or triggering browser back gestures.scrollbar-gutter: stable reserves the scrollbar space so content does not jump when the scrollbar appears.th scope="row") scrolls with the rest; keep the reference column first so each row stays identifiable when scrolling starts.<forma-dense-ledger class="forma-component-tag">
<div class="forma-bounded-overflow" role="region" aria-label="Inventory movements" tabindex="0">
<table class="forma-dense-ledger">
<caption>Inventory movements</caption>
<thead><tr><th scope="col">Movement</th><th scope="col">SKU</th><th scope="col">Quantity</th><th scope="col">Location</th><th scope="col">Status</th></tr></thead>
<tbody>
<tr><th scope="row">MV-7001</th><td>BRK-2210</td><td>240</td><td>Aisle 14, bay C</td><td>Received</td></tr>
<tr><th scope="row">MV-7002</th><td>BRK-2214</td><td>−18</td><td>Returns cage</td><td>Needs count</td></tr>
</tbody>
</table>
</div>
</forma-dense-ledger>
Click or tap the code once to select all of it, then copy.
The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.
Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.
| Attribute | On | Values | Default | Description |
|---|---|---|---|---|
role | .forma-bounded-overflow | region | — | Names the scroll container as a landmark so it can be found and scrolled. |
aria-label | .forma-bounded-overflow | string | — | Accessible name of the scroll region; usually the table's caption. |
tabindex | .forma-bounded-overflow | 0 | — | Makes the region keyboard-focusable so overflowing columns can be scrolled with arrow keys. |
scope | th | col | row | — | col on header cells, row on the reference cell that identifies each row. |
datetime | time | ISO date-time | — | Machine-readable timestamp for time columns. |
style | table.forma-dense-ledger | --forma-ledger-cell-space | — | Optional inline override of cell padding, or set the property from application CSS. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-dense-ledger | Block class | — | The native table. Full width, collapsed borders, tabular numerals and ruled rows. |
--forma-ledger-cell-space | Custom property | — | Padding of every th and td. Default var(--forma-primitive-spacing-2) (0.5rem). |
| Keys | Result |
|---|---|
| Tab | Focuses the scroll region (and any links or buttons inside cells). |
| Arrow keys | Scroll the focused region natively. There is no cell-by-cell navigation. |
Not a form control.
| State | How it is expressed | Presentation |
|---|---|---|
| Fits | table width ≤ region width | No scrollbar; the table fills the container. |
| Overflowing | table wider than .forma-bounded-overflow | The region scrolls horizontally inside itself; the page does not widen. |
| Unknown or missing value | application text in the cell | Written as words such as Unknown or Not recorded; Forma adds no styling that could be mistaken for a value. |
.forma-bounded-overflow with role="region", aria-label and tabindex="0" whenever it can overflow.caption and mark the identifying column with th scope="row"..forma-bounded-overflow: overflow: auto, overscroll-behavior: contain and a stable scrollbar gutter.overflow-wrap: anywhere on td and th) before forcing extra width.Generated fault-injection specimens expose content, spacing, color-cue, and reduced-effective-contrast risks. They screen presentation robustness as engineering screens without claiming human-subject validation.