# Timeline

An ordered sequence of events with state, context and optional time labels.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, Timeline } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Timeline label="Project activity" items={[{id:"created",title:"Project created",state:"complete"},{id:"review",title:"Design review",state:"current"},{id:"release",title:"Release",state:"upcoming"}]} />
    </FloodRoot>
  );
}
```

## Design notes

- The native ordered list is read in the supplied order; the component does not sort or group events. IDs/titles are nonempty, IDs are unique and at most one event may be current.
- Each state has a visually hidden text equivalent; localize stateLabels. timeLabel is user-facing text and dateTime, when supplied, is the machine-readable time. Both are host-owned.
- Markers and optional artwork are decorative. This is an event display, not a wizard or navigation control. Long descriptions and times wrap without changing marker alignment.
- Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `string` | `Required` |
| `items` | `readonly TimelineItem[]` | `Required` |
| `stateLabels` | `{complete?: string; current?: string; upcoming?: string}` | `—` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLOListElement>, "children">` | `Forwarded` |
