# Record Timeline

> Everything that happened on a record, newest first and grouped by day: emails, calls, meetings, notes, tasks, stage changes, documents and system events.

Component · CRM · Pro kit · [Live page](https://ui.twentyfirst.media/pro/components/RecordTimeline/)

Everything that happened on a record, newest first and grouped by day: emails, calls, meetings,
notes, tasks, stage changes, documents and system events.

- Pinned entries stay on top. Chips filter by type (`filters={false}` hides them).
- `onAdd(type, text)` shows a composer for a note, a call or a task.
- "Today" and "Yesterday" come from `Intl.RelativeTimeFormat`; pass `now` for stable output.

## Example

```tsx
import * as React from "react";
import { Panel, RecordTimeline } from "@twentyfirstmedia/pro";
import type { RecordEntry } from "@twentyfirstmedia/pro";
import { ENTRIES, NOW } from "./_crm";

export default function Preview() {
  const [entries, setEntries] = React.useState<RecordEntry[]>(ENTRIES);
  return (
    <Panel title="Activity" style={{ maxWidth: 720 }}>
      <RecordTimeline
        entries={entries}
        now={NOW}
        onAdd={(type, text) =>
          setEntries((all) => [
            { id: String(all.length + 1), type, title: text, at: new Date(), actor: "You" },
            ...all,
          ])
        }
      />
    </Panel>
  );
}
```

## Props

### RecordTimeline

| Prop | Type | Notes |
| --- | --- | --- |
| `entries` | `RecordEntry[]` | Required |
| `now?` | `Date \| string \| number` | "Now" for the day headings; pass it so server and client render the same. |
| `filters?` | `boolean` | Chips that filter by type (default true). |
| `onAdd?` | `(type: "note" \| "call" \| "task", text: string) => void` | Adds the composer for a note, a logged call or a task. |
| `label?` | `string` | Accessible name (default "Activity"). |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Panel

| Prop | Type | Notes |
| --- | --- | --- |
| `side?` | `boolean` |  |
| `title?` | `string` |  |
| `subtitle?` | `string` |  |
| `action?` | `ReactNode` |  |
| `children?` | `ReactNode` |  |
| `surface?` | `Surface` | `"glass"`: translucent glass over what is behind (maps, 3D, video, photos); `"solid"` opts out inside a glass `UIProvider`. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
