[Components](https://oods-foundry.com/components) / core

# PreferenceTimeline

Lists recorded preference changes over time.

Generated from @oods/foundry 0.10.1

- Categories

  core

- Contexts

  timeline

- Readiness

  `react-and-vue`

## Playground

This component's contract doesn't list typed props, so the playground shows its documented example.

Documented example `preference-timeline-changes` : mount, one change event with its updatedAt time and description detail in the preference timeline type.

The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.

The real PreferenceTimeline, live

React

## Preference changes

1. notifications.email

   2026-09-03T08:00:00Z

   Enabled

Vue

## Preference changes

1. notifications.email

   2026-09-03T08:00:00Z

   Enabled

## Code

The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.

**React**

```
import { PreferenceTimeline } from '@oods/components-react';
import '@oods/component-styles/css';

const changes = [
  {
    "event": "notifications.email",
    "updatedAt": "2026-09-03T08:00:00Z",
    "description": "Enabled"
  }
];

export function Example() {
  return (
    <PreferenceTimeline
      name="Preference changes"
      changes={changes}
    />
  );
}
```

## Props, slots and events

Contract version 1.1.0. Types are from the React declarations in @oods/components-react.

Props

| Prop | Type | Required | Documented example |
| - | - | - | - |
| `title` | `string \| undefined` | no | |
| `label` | `string \| undefined` | no | |
| `heading` | `string \| undefined` | no | |
| `name` | `string \| undefined` | no | `Preference changes` |
| `events` | `readonly unknown[] \| undefined` | no | |
| `changes` | `readonly unknown[] \| undefined` | no | `[{"event":"notifications.email","updatedAt":"2026-09-03T08:00:00Z","description":"Enabled"}]` |
| `history` | `readonly unknown[] \| undefined` | no | |

### Slots

default

### Events

none

## States

populated, empty

## Accessibility

- Role

  `log`

- How it gets its name

  `aria-label` on `[role="log"]`

### Keyboard

The contract lists no keyboard behaviour.

### Obligations in the contract

- A log region named by its title, which is also a real h3 heading
- Events are an ordered list with machine-readable timestamps
- An empty timeline is named No events

Mirrors renderPreferenceTimeline over renderTimelineContainer with data-timeline-type=preference and role=log: title aliases title/label/heading/name (default Preference Timeline); the first array among events/changes/history supplies the events, each rendered as label, time and detail exactly as normalizeTimelineItems reads them (records use label/title/event/status/state/text/name, timestamp/datetime/time/at/createdAt/updatedAt and detail/description/reason/message/from/to; scalars render as text); no events renders the named empty item; authored children replace the list. metadataField is consumed and left unbound because the renderer reads no metadata.

## Tokens

The token roles this component reads.

- `timeline.background`
- `timeline.border`
- `timeline.text`
- `timeline.marker`

## Readiness

The evidence recorded for this component, with its label.

`react-and-vue`: catalog_list gives this label when the React and Vue components have complete readiness evidence, but the sweep's generated apps don't use the component in both.

Readiness evidence

| Evidence | React | Vue |
| - | - | - |
| state | implemented-evidence-complete | implemented-evidence-complete |
| versioned contract | passed | passed |
| target implementation | passed | passed |
| package export | passed | passed |
| public declaration | passed | passed |
| dependency closure | passed | passed |
| framework scenario | passed | passed |
| accessibility | verified | verified |
| interaction | not-applicable | not-applicable |
| visual themes | verified | verified |

PreferenceTimeline presents content and owns no focusable control or action; authored child actions remain the consumer's responsibility.

## Use your own

You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.

The `component_map` call, with the parts in angle brackets yours to fill:

```
{
  "action": "create",
  "apply": true,
  "externalSystem": "<your design system>",
  "externalComponent": "<YourPreferenceTimeline>",
  "oodsTraits": [
    "<trait names>"
  ],
  "substitution": {
    "component": "PreferenceTimeline",
    "react": {
      "package": "<your-package>/react",
      "version": "<exact version>",
      "export": "<YourPreferenceTimeline>"
    },
    "vue": {
      "package": "<your-package>/vue",
      "version": "<exact version>",
      "export": "<YourPreferenceTimeline>"
    }
  }
}
```

## How this page was made

Generated at build from the published data, each source with the hash of what was read. [The page's manifest](https://oods-foundry.com/components/preference-timeline/manifest.json).

- **Contract**: `@oods/component-contracts@0.10.1 componentContracts.PreferenceTimeline` `sha256:b62914502699…`
- **Documented example**: `@oods/component-contracts@0.10.1 sharedScenarios preference-timeline-changes` `sha256:edb0740e14a8…`
- **Catalog entry (catalog_list)**: `generated/0.10.1/system/catalog.json PreferenceTimeline` `sha256:17e1362e061d…`
- **React readiness**: `@oods/components-react@0.10.1 readiness PreferenceTimeline` `sha256:70ea0acdf16e…`
- **Vue readiness**: `@oods/components-vue@0.10.1 readiness PreferenceTimeline` `sha256:aadbcf56772b…`
- **Prop types**: `generated/0.10.1/components/prop-types.json PreferenceTimeline` `sha256:521701b166fe…`
