Data display

Feed item

<forma-feed-item>

Compact chronological item with explicit identity, state, metadata, and owned actions.

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

Purpose

A feed item is one entry in an activity or notification stream: where it came from, what it is about, its state and time, a one-line summary, and the actions that belong to it. Forma lays it out as a two-column grid with identity on the start side and status/time on the end side, and gives the summary and actions full rows beneath. The application decides what appears in the feed, its order, what the state means and which actions are legal.

Use when

  • A stream of events or notifications is triaged one item at a time, and each item may have its own action.
  • Each item needs a visible source, title, state and time at a glance.
  • Items appear in a list or inbox that users scan top to bottom.

Avoid when

  • The list is a historical record without actions: use Timeline.
  • Items are unresolved work ranked by attention with one next action each: use Work queue.
  • The item is a transient system message: use Toast or Alert.
  • Items are messages in a conversation: use Conversation.

Behavior to know

  • Grid of minmax(0, 1fr) auto: identity on the start side, meta (status and time) on the end side.
  • .forma-feed-item__summary and .forma-feed-item__actions span both columns.
  • Margins are removed from the primary heading and paragraph and from the summary, so items stay compact.
  • At 30rem and below the grid becomes one column and the meta row aligns to the start.

Basic example

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

Canonical

Minimal feed item

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.

Build system

Deployment requires review

Needs review

Production approval is still unresolved.

HTML · Minimal feed item Raw HTML for HTML · Minimal feed item
<forma-feed-item class="forma-component-tag">
<article class="forma-feed-item" aria-labelledby="feed-item-title">
  <div class="forma-feed-item__primary">
    <p class="forma-feed-item__source">Build system</p>
    <h2 id="feed-item-title">Deployment requires review</h2>
  </div>
  <div class="forma-feed-item__meta">
    <span class="forma-status-lozenge" data-state="warning">Needs review</span>
    <time datetime="2026-09-25T18:30:00Z">18:30</time>
  </div>
  <p class="forma-feed-item__summary">Production approval is still unresolved.</p>
  <div class="forma-feed-item__actions"><button type="button">Review</button></div>
</article>
</forma-feed-item>

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

Examples

Scenario

Mention with several actions

A comment mention with two owned actions. The buttons name the item they act on, because many feed items can carry a Reply button.

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.

Comment on INV-1042

Priya Raman mentioned you

Unread

“Can you confirm the revised payment terms before I send this to Acme?”

HTML · Mention with several actions Raw HTML for HTML · Mention with several actions
<forma-feed-item class="forma-component-tag">
  <article class="forma-feed-item" aria-labelledby="feed-item-mention-with-actions-title">
    <div class="forma-feed-item__primary">
      <p>Comment on INV-1042</p>
      <h2 id="feed-item-mention-with-actions-title">Priya Raman mentioned you</h2>
    </div>
    <div class="forma-feed-item__meta">
      <span class="forma-status-lozenge">Unread</span>
      <time datetime="2026-09-29T09:41:00Z">09:41</time>
    </div>
    <p class="forma-feed-item__summary">“Can you confirm the revised payment terms before I send this to Acme?”</p>
    <div class="forma-feed-item__actions forma-cluster">
      <button type="button" aria-label="Reply to Priya Raman on INV-1042">Reply</button>
      <button type="button" aria-label="Mark Priya Raman's mention as read">Mark as read</button>
    </div>
  </article>
</forma-feed-item>

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

Scenario

Resolved item without actions

An item that no longer needs anything. The application renders no actions region, and the state reads Resolved in words.

Monitoring

Checkout latency back within limits

Resolved

p95 latency returned below 400 ms after the cache node was replaced.

HTML · Resolved item without actions Raw HTML for HTML · Resolved item without actions
<forma-feed-item class="forma-component-tag">
  <article class="forma-feed-item" aria-labelledby="feed-item-resolved-without-actions-title">
    <div class="forma-feed-item__primary">
      <p>Monitoring</p>
      <h2 id="feed-item-resolved-without-actions-title">Checkout latency back within limits</h2>
    </div>
    <div class="forma-feed-item__meta">
      <span class="forma-status-lozenge" data-state="ok">Resolved</span>
      <time datetime="2026-09-29T06:12:00Z">06:12</time>
    </div>
    <p class="forma-feed-item__summary">p95 latency returned below 400 ms after the cache node was replaced.</p>
  </article>
</forma-feed-item>

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

Scenario

Feed list with a long title

Several items stacked in a labelled section. A long, translated title wraps in the start column while the meta column keeps its natural width.

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.

Système de facturation

La validation de la publication du rapport trimestriel nécessite une revue manuelle

À vérifier

Build system

Nightly build passed

Passed
HTML · Feed list with a long title Raw HTML for HTML · Feed list with a long title
<forma-feed-item class="forma-component-tag">
  <section class="forma-stack" data-density="standard" aria-label="Recent activity">
    <article class="forma-feed-item" lang="fr" aria-labelledby="feed-item-feed-list-long-title-first">
      <div class="forma-feed-item__primary">
        <p>Système de facturation</p>
        <h2 id="feed-item-feed-list-long-title-first">La validation de la publication du rapport trimestriel nécessite une revue manuelle</h2>
      </div>
      <div class="forma-feed-item__meta">
        <span class="forma-status-lozenge" data-state="attention">À vérifier</span>
        <time datetime="2026-09-29T10:02:00Z">10:02</time>
      </div>
      <div class="forma-feed-item__actions"><button type="button" aria-label="Examiner la validation du rapport trimestriel">Examiner</button></div>
    </article>
    <article class="forma-feed-item" aria-labelledby="feed-item-feed-list-long-title-second">
      <div class="forma-feed-item__primary">
        <p>Build system</p>
        <h2 id="feed-item-feed-list-long-title-second">Nightly build passed</h2>
      </div>
      <div class="forma-feed-item__meta">
        <span class="forma-status-lozenge" data-state="ok">Passed</span>
        <time datetime="2026-09-29T02:00:00Z">02:00</time>
      </div>
    </article>
  </section>
</forma-feed-item>

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 feed item

A blocked deployment item at phone width. Status and time move under the title; the summary and action follow in reading order.

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 width

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

What changes at narrow widths

  • At 30rem (480px) and below the grid becomes a single minmax(0, 1fr) column and .forma-feed-item__meta aligns to the start under the title.
  • Status and time wrap onto separate lines if they do not fit side by side.
  • Actions keep their natural width; the application can give a single primary action full width if the item is the main target.
  • Reading order is identical at every width because only grid placement changes.
HTML · Mobile feed item Raw HTML for HTML · Mobile feed item
<forma-feed-item class="forma-component-tag">
  <article class="forma-feed-item" aria-labelledby="feed-item-mobile-feed-item-title">
    <div class="forma-feed-item__primary">
      <p>Deployments</p>
      <h2 id="feed-item-mobile-feed-item-title">Release rel-2026.09.29 is blocked</h2>
    </div>
    <div class="forma-feed-item__meta">
      <span class="forma-status-lozenge" data-state="blocked">Blocked</span>
      <time datetime="2026-09-29T11:20:00Z">11:20</time>
    </div>
    <p class="forma-feed-item__summary">Two required checks have not reported.</p>
    <div class="forma-feed-item__actions"><button type="button" aria-label="View blocked checks for rel-2026.09.29">View checks</button></div>
  </article>
</forma-feed-item>

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 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 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-labelledbyarticle.forma-feed-itemid of the item heading—Names the article by its title so it can be found in a list of articles.
datetimetimeISO date-time—Machine-readable time of the item.
aria-labelaction buttonstring—Names the item an action applies to when the visible label is generic.
typebuttonbutton—Actions are native buttons that the application wires to its own handlers.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-feed-itemBlock class—The item root, usually an article. Two-column grid; one column at 30rem and below.
.forma-feed-item__actionsElement class—Optional actions row spanning the full width.
.forma-feed-item__metaElement class—End column: status and time in a wrapping row, end-aligned (start-aligned on phones).
.forma-feed-item__primaryElement class—Start column: source line and title. Margins on its h2 and p are removed.
.forma-feed-item__summaryElement class—Optional one-line summary spanning the full width.
Keyboard interaction
KeysResult
TabMoves to each action button in the item. The item itself is not focusable.
Enter / SpaceActivates a focused action button (native).
Events
EventDescription
clickNative click on action buttons; the application performs the action and updates or removes the item.

Form behavior

Not a form control.

States

Feed item states
StateHow it is expressedPresentation
With actions.forma-feed-item__actions presentActions row below the summary.
No actionsactions element omittedThe item ends after its summary or meta.
Item stateStatus lozenge text in .forma-feed-item__metaUnread, Resolved, Blocked and so on are stated in words by the application.
Stackedviewport ≤ 30remSingle column with meta aligned to the start.

Accessibility

Forma provides

  • Keeps DOM order equal to reading order at every width: source, title, state, time, summary, actions.
  • Leaves state as visible text (typically a Status lozenge with a glyph), not color.
  • Lets the title and summary wrap (minmax(0, 1fr)), so long content does not overflow.

Your application supplies

  • Give each item a heading at the right level and reference it with aria-labelledby.
  • Provide record-specific accessible names for repeated actions such as Reply or Review.
  • Render only actions that are currently legal; do not show disabled actions without an explanation.
  • Group items in a labelled section or list and announce newly arrived items through an application live region if the feed updates live.

Responsive behavior

  • Above 30rem: identity and meta side by side; summary and actions full width.
  • At 30rem and below: one column, meta start-aligned under the title.
  • Long titles wrap within the start column; the meta column keeps its natural width on wide layouts.

Motion

  • No animation: items appear, update and disappear without transitions. Any insertion animation or read/unread effect is application behavior.

Usage guidance

Do

  • Show the source and the time on every item.
  • Keep one clear primary action per item, or none when nothing is needed.

Avoid

  • Using bold or background color alone to signal unread; write Unread.
  • Relative times without a machine-readable datetime.
  • Packing several unrelated actions into one item.

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.