# Timeline

Source: https://ecosphere.dev/docs/data/timeline (Ecosphere 1.5). Install `vue-ecosphere` for Vue 3 or `react-ecosphere` for React 18.2+/19: same components, props, markup and stylesheet.

A dated group with a tile, a heading pair and nested entries under a running rule — or an evidence trail from source to use.

`import { EcoTimeline } from "vue-ecosphere"`

## Group

The group date on top spans its children, so nested entries repeat only their own span.

Vue (vue-ecosphere):

```vue
<EcoTimeline :groups="[{
  when: 'Jun 2023 – Present · 3 yrs 2 mos',
  tile: 'v4',
  title: 'Version 4',
  heading: 'Generally available',
  entries: [
    { title: '4.12 — regional failover', span: 'Jul 2024 – Present · 2 yrs 1 mo',
      meta: ['Stable', 'All regions'],
      description: 'Traffic now drains to the nearest healthy region without a manual cutover.' },
    { title: '4.0 — first release', span: 'Jun 2023 – Aug 2023 · 3 mos',
      meta: ['Superseded', 'eu-west-1'],
      description: 'Initial cut, single region, behind a flag for the first six weeks.' },
  ],
}]" />
```

React (react-ecosphere):

```tsx
<EcoTimeline
  groups={[{
    when: "Jun 2023 – Present · 3 yrs 2 mos",
    tile: "v4",
    title: "Version 4",
    heading: "Generally available",
    entries: [
      { title: "4.12 — regional failover", span: "Jul 2024 – Present · 2 yrs 1 mo",
        meta: ["Stable", "All regions"],
        description: "Traffic now drains to the nearest healthy region without a manual cutover." },
      { title: "4.0 — first release", span: "Jun 2023 – Aug 2023 · 3 mos",
        meta: ["Superseded", "eu-west-1"],
        description: "Initial cut, single region, behind a flag for the first six weeks." },
    ],
  }]}
/>
```

## Evidence trail

Answers “where did this number come from?” for one value. Every dot is the same hollow ring: order here is cause and effect, not recency.

Vue (vue-ecosphere):

```vue
<EcoTimeline
  variant="trail"
  label="Evidence for the price of a hex bolt, M8 × 40, box of 100"
  :stages="[
    { title: 'Supplier catalogue', status: { label: 'Source page', tone: 'neutral' },
      meta: ['spring-catalogue.pdf', 'Page 14', 'Row 22'],
      body: ['Listed as \'Hex bolt M8 × 40, zinc plated, box of 100\' at £12.40 a box.'],
      link: { label: 'Open the source page', href: '#source-page' } },
    { title: 'Extracted price', status: { label: 'Matched', tone: 'success' },
      values: [{ term: 'Price', detail: '£12.40' }, { term: 'Unit', detail: 'Box of 100' }],
      link: { label: 'Inspect the extraction', href: '#extraction' } },
    // …
  ]"
/>
```

React (react-ecosphere):

```tsx
<EcoTimeline
  variant="trail"
  label="Evidence for the price of a hex bolt, M8 × 40, box of 100"
  stages={[
    { title: "Supplier catalogue", status: { label: "Source page", tone: "neutral" },
      meta: ["spring-catalogue.pdf", "Page 14", "Row 22"],
      body: ['Listed as "Hex bolt M8 × 40, zinc plated, box of 100" at £12.40 a box.'],
      link: { label: "Open the source page", href: "#source-page" } },
    { title: "Extracted price", status: { label: "Matched", tone: "success" },
      values: [{ term: "Price", detail: "£12.40" }, { term: "Unit", detail: "Box of 100" }],
      link: { label: "Inspect the extraction", href: "#extraction" } },
    // …
  ]}
/>
```

## Evidence trail with a stage not assessed

Say why in the stage body, and that nearby values were not checked.

## API

Vue (vue-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"group" \| "trail"` | "group" | Dated groups with nested entries, or an evidence trail (ol.tl.tl--trail). |
| `groups` | `EcoTimelineGroup[]` | — | when, tile, title (tl__co), heading (tl__h), entries: { title, span, meta[], description }. |
| `stages` | `EcoTrailStage[]` | — | Trail stages, source first: title, status badge, meta[], body[], values (kv), link. Leave the link out when there is nothing to open. |
| `label` | `string` | — | Trail: names what is traced (“Evidence for the price of …”). |
| `level` | `2 \| 3 \| 4 \| 5` | 3 | Trail: heading level of each stage name. |

React (react-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"group" \| "trail"` | "group" | Dated groups with nested entries, or an evidence trail (ol.tl.tl--trail). |
| `groups` | `EcoTimelineGroup[]` | — | when, tile, title (tl__co), heading (tl__h), entries: { title, span, meta[], description }. |
| `stages` | `EcoTrailStage[]` | — | Trail stages, source first: title, status badge, meta[], body[], values (kv), link. Leave the link out when there is nothing to open. |
| `label` | `string` | — | Trail: names what is traced (“Evidence for the price of …”). |
| `level` | `2 \| 3 \| 4 \| 5` | 3 | Trail: heading level of each stage name. |
