Data display

Relationship index

<forma-relationship-index>

Provides a semantic non-spatial index of entity relationships and their direction.

Authoring tag
<forma-relationship-index>
Category
Data display
Behavior owner
Application content
Canonical source
patterns/relationship-index.html

Purpose

A relationship index lists the relationships of one selected entity as text: each row names a relationship type with its direction (Depends on, Depended on by, Publishes to) and links to the related entities. It is the non-spatial equivalent of the lines in a Diagram or Spatial canvas, so users who cannot see or navigate the drawing still get the complete set of connections. Forma lays it out as a description list; the relationships, their direction wording and their order come from the application's model.

Use when

  • A diagram, map or canvas shows connections and needs an accessible, text-only equivalent.
  • Users inspect one entity and need its incoming and outgoing relationships at a glance.
  • Related entities are navigable, and each should be a link.

Avoid when

Behavior to know

  • Section grid with a header (title and selected entity) and a description list.
  • Each row is a div with the relationship type as a bold dt (minmax(7rem, 10rem)) and targets in a dd with no indent.
  • Direction is carried by the relationship wording, not by arrows or position.
  • At 30rem and below each row stacks the type above its targets.

Basic example

The smallest correct markup: the canonical pattern from patterns/relationship-index.html inside its public tag. Copy this first, then adapt labels, names and state.

Canonical

Minimal relationship index

Rendered from the canonical pattern file.

Static specimen. 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.

Relationships

Selected entity: Billing

Depends on
Chrona
Publishes to
Summa
HTML · Minimal relationship index Raw HTML for HTML · Minimal relationship index
<forma-relationship-index class="forma-component-tag">
<section class="forma-relationship-index" aria-labelledby="relationships-title">
  <header><h2 id="relationships-title">Relationships</h2><p>Selected entity: Billing</p></header>
  <dl class="forma-relationship-index__list">
    <div><dt>Depends on</dt><dd><a href="#chrona">Chrona</a></dd></div>
    <div><dt>Publishes to</dt><dd><a href="#summa">Summa</a></dd></div>
    <div><dt>Owned by</dt><dd><a href="#finance">Finance domain</a></dd></div>
  </dl>
</section>
</forma-relationship-index>

Click or tap the code once to select all of it, then copy.

Examples

Scenario

Incoming and outgoing relationships

Both directions for the Billing service. Outgoing (Depends on) and incoming (Depended on by) are distinct relationship names, and several targets share a row as a comma-separated list of links. A relationship with no targets says None recorded.

Static specimen. 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.

Relationships of Billing

Direction is stated from Billing's point of view.

Depends on
Chrona, Ledger
Replaces
None recorded
HTML · Incoming and outgoing relationships Raw HTML for HTML · Incoming and outgoing relationships
<forma-relationship-index class="forma-component-tag">
  <section class="forma-relationship-index" aria-labelledby="relationship-index-incoming-and-outgoing-title">
    <header><h2 id="relationship-index-incoming-and-outgoing-title">Relationships of Billing</h2><p>Direction is stated from Billing's point of view.</p></header>
    <dl class="forma-relationship-index__list">
      <div><dt>Depends on</dt><dd><a href="#relationship-index-incoming-and-outgoing-chrona">Chrona</a>, <a href="#relationship-index-incoming-and-outgoing-ledger">Ledger</a></dd></div>
      <div><dt>Depended on by</dt><dd><a href="#relationship-index-incoming-and-outgoing-summa">Summa</a>, <a href="#relationship-index-incoming-and-outgoing-portal">Customer portal</a>, <a href="#relationship-index-incoming-and-outgoing-reports">Finance reports</a></dd></div>
      <div><dt>Publishes to</dt><dd><a href="#relationship-index-incoming-and-outgoing-events">invoice.events topic</a></dd></div>
      <div><dt>Replaces</dt><dd>None recorded</dd></div>
    </dl>
  </section>
</forma-relationship-index>

Click or tap the code once to select all of it, then copy.

Scenario

Text equivalent of a diagram selection

The index sits under a system map and updates with the selected node. The header names the selection and states that the list mirrors the diagram's connections, including one the diagram marks as unverified.

Static specimen. 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.

Connections of the selected node

Selected: Payments gateway. Lists every connector drawn in the system map.

Sends requests to
Bank connector
Receives from
Checkout
Reports to
Monitoring (unverified: last seen 3 days ago)
HTML · Text equivalent of a diagram selection Raw HTML for HTML · Text equivalent of a diagram selection
<forma-relationship-index class="forma-component-tag">
  <section class="forma-relationship-index" aria-labelledby="relationship-index-diagram-equivalent-title">
    <header><h2 id="relationship-index-diagram-equivalent-title">Connections of the selected node</h2><p>Selected: Payments gateway. Lists every connector drawn in the system map.</p></header>
    <dl class="forma-relationship-index__list">
      <div><dt>Sends requests to</dt><dd><a href="#relationship-index-diagram-equivalent-bank">Bank connector</a></dd></div>
      <div><dt>Receives from</dt><dd><a href="#relationship-index-diagram-equivalent-checkout">Checkout</a></dd></div>
      <div><dt>Reports to</dt><dd><a href="#relationship-index-diagram-equivalent-monitoring">Monitoring</a> (unverified: last seen 3 days ago)</dd></div>
    </dl>
  </section>
</forma-relationship-index>

Click or tap the code once to select all of it, then copy.

Mobile

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.

Mobile example

Mobile relationship index

The index at phone width, where each relationship type sits above its targets.

Static specimen. 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.

Viewport width

Frames narrower than the selected width show the component at the width available.

What changes at narrow widths

  • At 30rem (480px) and below each row becomes one column with a 0.25rem gap: relationship type, then targets.
  • Several targets in one dd wrap as inline links; keep link text meaningful so each is a usable tap target.
  • Because the index is text, it is often the primary way to explore connections on a phone where a diagram would need panning.
  • Order and wording are the same at every width.
HTML · Mobile relationship index Raw HTML for HTML · Mobile relationship index
<forma-relationship-index class="forma-component-tag">
  <section class="forma-relationship-index" aria-labelledby="relationship-index-mobile-relationships-title">
    <header><h2 id="relationship-index-mobile-relationships-title">Relationships</h2><p>Selected entity: Customer record</p></header>
    <dl class="forma-relationship-index__list">
      <div><dt>Owned by</dt><dd><a href="#relationship-index-mobile-relationships-sales">Sales domain</a></dd></div>
      <div><dt>Referenced by</dt><dd><a href="#relationship-index-mobile-relationships-invoices">Invoices</a>, <a href="#relationship-index-mobile-relationships-tickets">Support tickets</a></dd></div>
    </dl>
  </section>
</forma-relationship-index>

Click or tap the code once to select all of it, then copy.

Baseline

Mobile · 320px

The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.

Static specimen. 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.

Viewport width

Frames narrower than the selected width show the component at the width available.

API and configuration

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.

Native and ARIA attributes
AttributeOnValuesDefaultDescription
aria-labelledbysection.forma-relationship-indexid of the header heading—Names the index, ideally including the selected entity.
hrefaURL or fragment—Each related entity links to its own view or to its node.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-relationship-indexBlock class—Root section; a grid with 0.75rem gaps. Removes the trailing margin of the header's last child.
.forma-relationship-index__listElement class—The dl. Each div row is a two-column grid (minmax(7rem, 10rem) type, flexible targets); dt is semibold and dd has no margin. Rows stack at 30rem and below.
Keyboard interaction
KeysResult
TabMoves through the links to related entities.
EnterFollows the focused link (native).

Form behavior

Not a form control.

States

Relationship index states
StateHow it is expressedPresentation
Relationship with targetsdt plus dd containing linksType and linked entities.
No targetsapplication text such as None recordedStated in words so absence is explicit.
Stackedviewport ≤ 30remType above targets.

Accessibility

Forma provides

  • Uses a native description list, so each relationship type is associated with its targets.
  • Expresses direction in text, independent of any diagram geometry or arrow glyph.
  • Keeps the same reading order at every width.

Your application supplies

  • Word each relationship with its direction from the selected entity's point of view.
  • Include every relationship the diagram shows, including uncertain ones, with their status in text.
  • Update the header and list when the selection changes, and announce the change if it happens without navigation.
  • Put one dd per row; list several targets inside it.

Responsive behavior

  • Two columns above 30rem; stacked at 30rem and below.
  • Targets wrap inside the flexible column; the type column is capped at 10rem.

Motion

  • No animation: the index is static and replaced by the application when the selection changes.

Usage guidance

Do

  • Use consistent relationship names across the product and in the diagram legend.
  • Link every related entity.

Avoid

  • Arrows or symbols as the only indication of direction.
  • Multiple dd elements in one row; the grid places the second one under the type.

Verification specimens

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.