Billing
Selected node
<forma-spatial-canvas>
Provides a bounded spatial exploration surface with orientation and a non-spatial access path.
<forma-spatial-canvas>patterns/spatial-canvas.htmlA spatial canvas frames a surface that is larger than the screen, such as a system map, floor plan or board of related objects, inside a bounded, keyboard-scrollable viewport. Around it Forma places three things spatial views usually lack: a text orientation line that says what part of the space is in view, a control area for application-owned view actions (zoom, reset), and a native details index that lists the objects in view as ordinary links. Zoom level, panning, selection and what counts as "in view" belong to the application or Limen; Forma only draws the frame and keeps a non-spatial path to every object.
The smallest correct markup: the canonical pattern from patterns/spatial-canvas.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
Viewport: services / billing
<forma-spatial-canvas class="forma-component-tag">
<section class="forma-spatial-canvas" aria-labelledby="canvas-title">
<header class="forma-spatial-canvas__header">
<div><h2 id="canvas-title">System map</h2><p class="forma-spatial-canvas__orientation">Viewport: services / billing</p></div>
<div class="forma-cluster" aria-label="Canvas controls"><button type="button">Zoom out</button><button type="button">Reset view</button><button type="button">Zoom in</button></div>
</header>
<div class="forma-spatial-canvas__viewport" tabindex="0" aria-label="Scrollable system map">
<div class="forma-spatial-canvas__surface">
<article class="forma-surface" id="billing"><h3>Billing</h3><p>Selected node</p></article>
<article class="forma-surface" id="chrona"><h3>Chrona</h3><p>Time source</p></article>
</div>
</div>
<details class="forma-spatial-canvas__index"><summary>Objects in this view</summary><nav aria-label="Canvas objects"><a href="#billing">Billing</a><a href="#chrona">Chrona</a></nav></details>
</section>
</forma-spatial-canvas>
Click or tap the code once to select all of it, then copy.
A facilities map zoomed into one floor. A Scope trail shows ancestry, the orientation line states zoom and region in words, the view controls are grouped and named, and the index is open so every desk in view is one link away.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its links point to placeholder destinations that do not exist on this site. Its controls are shown for their markup and appearance and cannot be operated here.
Zoom: floor level · showing east wing
<forma-spatial-canvas class="forma-component-tag">
<section class="forma-spatial-canvas" aria-labelledby="spatial-canvas-floor-plan-scope-title">
<header class="forma-spatial-canvas__header">
<div>
<nav class="forma-scope-trail" aria-label="Map scope"><ol><li><a href="#spatial-canvas-floor-plan-scope-campus">Campus</a></li><li><a href="#spatial-canvas-floor-plan-scope-building">Building C</a></li><li aria-current="page">Floor 3</li></ol></nav>
<h2 id="spatial-canvas-floor-plan-scope-title">Floor 3 desks</h2>
<p class="forma-spatial-canvas__orientation">Zoom: floor level · showing east wing</p>
</div>
<div class="forma-cluster" role="group" aria-label="Map view controls"><button type="button">Zoom out to building</button><button type="button">Reset view</button></div>
</header>
<div class="forma-spatial-canvas__viewport" tabindex="0" role="group" aria-label="Floor 3 map, scrollable">
<div class="forma-spatial-canvas__surface">
<article class="forma-surface" id="spatial-canvas-floor-plan-scope-c301"><h3>C-301</h3><p>Available</p></article>
<article class="forma-surface" id="spatial-canvas-floor-plan-scope-c302"><h3>C-302</h3><p>Booked · Priya Raman</p></article>
<article class="forma-surface" id="spatial-canvas-floor-plan-scope-c303"><h3>C-303</h3><p>Out of service</p></article>
</div>
</div>
<details class="forma-spatial-canvas__index" open>
<summary>Desks in this view (3)</summary>
<nav aria-label="Desks in view"><a href="#spatial-canvas-floor-plan-scope-c301">C-301</a><a href="#spatial-canvas-floor-plan-scope-c302">C-302</a><a href="#spatial-canvas-floor-plan-scope-c303">C-303</a></nav>
</details>
</section>
</forma-spatial-canvas>
Click or tap the code once to select all of it, then copy.
The user has panned to an area with no objects. The orientation line says so in text and offers a way back, so the empty surface is not mistaken for a loading failure; the index states that nothing is in view.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
Viewport: north-west edge · no services in view
Nothing here. Use Reset view to return to the billing cluster.
<forma-spatial-canvas class="forma-component-tag">
<section class="forma-spatial-canvas" aria-labelledby="spatial-canvas-empty-region-title">
<header class="forma-spatial-canvas__header">
<div><h2 id="spatial-canvas-empty-region-title">Service map</h2><p class="forma-spatial-canvas__orientation">Viewport: north-west edge · no services in view</p></div>
<div class="forma-cluster" role="group" aria-label="Service map controls"><button type="button">Reset view</button></div>
</header>
<div class="forma-spatial-canvas__viewport" tabindex="0" role="group" aria-label="Service map, scrollable">
<div class="forma-spatial-canvas__surface"></div>
</div>
<details class="forma-spatial-canvas__index">
<summary>Objects in this view (0)</summary>
<p>Nothing here. Use Reset view to return to the billing cluster.</p>
</details>
</section>
</forma-spatial-canvas>
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.
At phone width the surface scrolls inside its viewport and the index is the practical way to reach objects.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
.forma-spatial-canvas__viewport; the page does not scroll sideways at 320px.<forma-spatial-canvas class="forma-component-tag">
<section class="forma-spatial-canvas" aria-labelledby="spatial-canvas-mobile-title">
<header class="forma-spatial-canvas__header">
<div><h2 id="spatial-canvas-mobile-title">Warehouse zones</h2><p class="forma-spatial-canvas__orientation">Viewport: dock side</p></div>
<div class="forma-cluster" role="group" aria-label="Zone map controls"><button type="button">Zoom out</button><button type="button">Zoom in</button></div>
</header>
<div class="forma-spatial-canvas__viewport" tabindex="0" role="group" aria-label="Warehouse zone map, scrollable">
<div class="forma-spatial-canvas__surface">
<article class="forma-surface" id="spatial-canvas-mobile-dock"><h3>Dock A</h3><p>2 trucks unloading</p></article>
<article class="forma-surface" id="spatial-canvas-mobile-cold"><h3>Cold store</h3><p>At capacity</p></article>
</div>
</div>
<details class="forma-spatial-canvas__index">
<summary>Zones in this view</summary>
<nav aria-label="Zones in view"><a href="#spatial-canvas-mobile-dock">Dock A</a><a href="#spatial-canvas-mobile-cold">Cold store</a></nav>
</details>
</section>
</forma-spatial-canvas>
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.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
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 |
|---|---|---|---|---|
tabindex | .forma-spatial-canvas__viewport | 0 | — | Makes the scroll region focusable so it can be scrolled from the keyboard. |
role | viewport, control cluster | group | — | Gives the viewport and the control area a role so their accessible names are announced. |
aria-label | viewport, controls, index nav | string | — | Names the scroll region (say that it scrolls), the view controls and the object index. |
aria-labelledby | root section | id of the canvas heading | — | Names the whole canvas region. |
open | details.forma-spatial-canvas__index | boolean | absent | Initial open state of the object index. The browser owns it afterwards. |
aria-current | scope trail item | page | — | Marks the current scope when a Scope trail is composed in the header. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-spatial-canvas | Block class | — | Root grid: header, viewport, index, with a small gap. Shrinks to its container. |
.forma-spatial-canvas__header | Element class | — | Wrapping flex row with the title and orientation on one side and view controls on the other. |
.forma-spatial-canvas__index | Element class | — | A native details listing the objects in view; its summary is a 2.75rem target and its nav links wrap. |
.forma-spatial-canvas__orientation | Element class | — | Text line stating current scope, zoom or region. |
.forma-spatial-canvas__surface | Element class | — | The large surface: at least 48rem by 28rem, a three-column grid of objects with generous gaps. |
.forma-spatial-canvas__viewport | Element class | — | Bordered, focusable scroll region with an 18rem minimum height and a 2px focus outline. |
| Keys | Result |
|---|---|
| Tab / Shift+Tab | Moves through view controls, the viewport, links or controls inside objects, then the index summary and links. |
| Arrow keys, Page Up / Page Down (viewport focused) | Scrolls the surface. Native scrolling of a focused overflow region. |
| Enter / Space on the index summary | Opens or closes the object index. Native details behavior. |
| Zoom and reset shortcuts | Not provided. The view buttons are native buttons; their effect and any shortcuts are application or Limen behavior. |
| Event | Description |
|---|---|
toggle | Native event from the index details element. |
scroll | Native scroll event from the viewport, which the application can use to update the orientation line and index. |
Not a form control.
| State | How it is expressed | Presentation |
|---|---|---|
| Scope | text in .forma-spatial-canvas__orientation | Application-written description of what is in view. |
| Viewport focus | :focus-visible on the viewport | 2px outline in the current text color, offset from the border. |
| Index open | details[open] | The list of objects in view is shown below the viewport. |
| Empty view | no objects on the surface | The application states in text that nothing is in view and how to return. |
role="group" and a name.prefers-reduced-motion.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.