Tearsheet

Issue 01 · Content · p.30

Activity timeline

A vertical feed of events with machine-readable times.

Why it works: Wrap times in <time datetime="…"> so they can be parsed and localised. Newest first, unless the story is a process.

Try it:
Receipt: axe clean · contrast 6.7:1 · 0 tab stops · RTL ✓ · long text ✓

Tab order: nothing here takes focus (it is content, not controls).

What assistive tech is given

- list:
  - listitem:
    - paragraph:
      - strong: Maya
      - text: published version 2.4
    - time: Today, 9:12
  - listitem:
    - paragraph:
      - strong: Leo
      - text: merged “Fix focus ring in dark mode”
    - time: Yesterday, 17:40
  - listitem:
    - paragraph:
      - strong: Sam
      - text: opened an issue about the tooltip on touch screens
    - time: 21 Nov, 11:05
  - listitem:
    - paragraph: Project created
    - time: 20 Nov, 08:00

Automated checks in CI (axe in Chromium, reduced motion on). They catch a lot, not everything: still try it with a screen reader.

See it in the zine npx -y tearsheet add activity-timeline

Needs the shared tokens.css once per project.

HTML + CSS

index.html
<!-- tearsheet activity-timeline v8be89136 · https://qusaialjbali.github.io/tearsheet/zine/parts/activity-timeline.html -->
<ol class="timeline">
  <li class="tl-item tl-accent">
    <p class="tl-title"><strong>Maya</strong> published version 2.4</p>
    <time class="tl-time" datetime="2026-11-23T09:12">Today, 9:12</time>
  </li>
  <li class="tl-item">
    <p class="tl-title"><strong>Leo</strong> merged “Fix focus ring in dark mode”</p>
    <time class="tl-time" datetime="2026-11-22T17:40">Yesterday, 17:40</time>
  </li>
  <li class="tl-item">
    <p class="tl-title"><strong>Sam</strong> opened an issue about the tooltip on touch screens</p>
    <time class="tl-time" datetime="2026-11-21T11:05">21 Nov, 11:05</time>
  </li>
  <li class="tl-item">
    <p class="tl-title">Project created</p>
    <time class="tl-time" datetime="2026-11-20T08:00">20 Nov, 08:00</time>
  </li>
</ol>
styles.css
/* tearsheet activity-timeline v8be89136 · https://qusaialjbali.github.io/tearsheet/zine/parts/activity-timeline.html */
.timeline { width: 100%; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 22px 28px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: -6px;
  width: 2px;
  background: var(--ui-border);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-surface);
  border: 2px solid var(--ui-border-strong);
}
.tl-accent::after { background: var(--ui-accent); border-color: var(--ui-accent); box-shadow: 0 0 0 4px var(--ui-accent-soft); }
.tl-title { margin: 0; font-size: 15px; color: var(--ui-text); }
.tl-time { font-size: 13px; color: var(--ui-muted); }

React

ActivityTimeline.jsx
/* tearsheet activity-timeline v8be89136 · https://qusaialjbali.github.io/tearsheet/zine/parts/activity-timeline.html */
import './ActivityTimeline.css';

export function ActivityTimeline() {
  return (
    <ol className="timeline">
      <li className="tl-item tl-accent">
        <p className="tl-title"><strong>Maya</strong> published version 2.4</p>
        <time className="tl-time" dateTime="2026-11-23T09:12">Today, 9:12</time>
      </li>
      <li className="tl-item">
        <p className="tl-title"><strong>Leo</strong> merged “Fix focus ring in dark mode”</p>
        <time className="tl-time" dateTime="2026-11-22T17:40">Yesterday, 17:40</time>
      </li>
      <li className="tl-item">
        <p className="tl-title"><strong>Sam</strong> opened an issue about the tooltip on touch screens</p>
        <time className="tl-time" dateTime="2026-11-21T11:05">21 Nov, 11:05</time>
      </li>
      <li className="tl-item">
        <p className="tl-title">Project created</p>
        <time className="tl-time" dateTime="2026-11-20T08:00">20 Nov, 08:00</time>
      </li>
    </ol>
  );
}
ActivityTimeline.css
/* tearsheet activity-timeline v8be89136 · https://qusaialjbali.github.io/tearsheet/zine/parts/activity-timeline.html */
.timeline { width: 100%; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 22px 28px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: -6px;
  width: 2px;
  background: var(--ui-border);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-surface);
  border: 2px solid var(--ui-border-strong);
}
.tl-accent::after { background: var(--ui-accent); border-color: var(--ui-accent); box-shadow: 0 0 0 4px var(--ui-accent-soft); }
.tl-title { margin: 0; font-size: 15px; color: var(--ui-text); }
.tl-time { font-size: 13px; color: var(--ui-muted); }

Vue

ActivityTimeline.vue
<!-- tearsheet activity-timeline v8be89136 · https://qusaialjbali.github.io/tearsheet/zine/parts/activity-timeline.html -->
<template>
  <ol class="timeline">
    <li class="tl-item tl-accent">
      <p class="tl-title"><strong>Maya</strong> published version 2.4</p>
      <time class="tl-time" datetime="2026-11-23T09:12">Today, 9:12</time>
    </li>
    <li class="tl-item">
      <p class="tl-title"><strong>Leo</strong> merged “Fix focus ring in dark mode”</p>
      <time class="tl-time" datetime="2026-11-22T17:40">Yesterday, 17:40</time>
    </li>
    <li class="tl-item">
      <p class="tl-title"><strong>Sam</strong> opened an issue about the tooltip on touch screens</p>
      <time class="tl-time" datetime="2026-11-21T11:05">21 Nov, 11:05</time>
    </li>
    <li class="tl-item">
      <p class="tl-title">Project created</p>
      <time class="tl-time" datetime="2026-11-20T08:00">20 Nov, 08:00</time>
    </li>
  </ol>
</template>

<style scoped>
.timeline { width: 100%; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 22px 28px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: -6px;
  width: 2px;
  background: var(--ui-border);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-surface);
  border: 2px solid var(--ui-border-strong);
}
.tl-accent::after { background: var(--ui-accent); border-color: var(--ui-accent); box-shadow: 0 0 0 4px var(--ui-accent-soft); }
.tl-title { margin: 0; font-size: 15px; color: var(--ui-text); }
.tl-time { font-size: 13px; color: var(--ui-muted); }
</style>

Svelte

ActivityTimeline.svelte
<!-- tearsheet activity-timeline v8be89136 · https://qusaialjbali.github.io/tearsheet/zine/parts/activity-timeline.html -->
<ol class="timeline">
  <li class="tl-item tl-accent">
    <p class="tl-title"><strong>Maya</strong> published version 2.4</p>
    <time class="tl-time" datetime="2026-11-23T09:12">Today, 9:12</time>
  </li>
  <li class="tl-item">
    <p class="tl-title"><strong>Leo</strong> merged “Fix focus ring in dark mode”</p>
    <time class="tl-time" datetime="2026-11-22T17:40">Yesterday, 17:40</time>
  </li>
  <li class="tl-item">
    <p class="tl-title"><strong>Sam</strong> opened an issue about the tooltip on touch screens</p>
    <time class="tl-time" datetime="2026-11-21T11:05">21 Nov, 11:05</time>
  </li>
  <li class="tl-item">
    <p class="tl-title">Project created</p>
    <time class="tl-time" datetime="2026-11-20T08:00">20 Nov, 08:00</time>
  </li>
</ol>

<style>
.timeline { width: 100%; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 22px 28px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: -6px;
  width: 2px;
  background: var(--ui-border);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-surface);
  border: 2px solid var(--ui-border-strong);
}
.tl-accent::after { background: var(--ui-accent); border-color: var(--ui-accent); box-shadow: 0 0 0 4px var(--ui-accent-soft); }
.tl-title { margin: 0; font-size: 15px; color: var(--ui-text); }
.tl-time { font-size: 13px; color: var(--ui-muted); }
</style>