# TimeGrid

> A calendar's time grid: one column per day under a header of dates and a lane of all-day and multi-day spans, hours down the side in one or more time zones, timed events placed by their minutes with overlapping ones side by side, and a line at the present minute.

```ts
import { TimeGrid } from "@sdxc/ui/schedule";
```

Renders the grid: a header of day links over the all-day lane, then one scroller holding the
hour labels and the day columns. Each event is placed from its minutes, side by side with
those it overlaps; an editable one also takes a resize edge, and the forms `edit` names.

## Examples

```tsx
<TimeGrid id="week" label="Week of November 16" days={days} zones={zones} labels={labels}
	events={[{ id: "e1", date: "2026-11-18", start: 540, end: 600, title: "Standup" }]} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `label` | `string` | The grid's accessible name, such as "Week of November 16". |
| `id` | `string` | Unique on the page; prefixes every event's popover id. |
| `days` | `Day[]` |  |
| `events` | `Event[]` |  |
| `spans?` | `Span[]` |  |
| `zones` | `Zone[]` | The viewer's zone, then any second zone, as columns of hour labels. |
| `today?` | `string` | Today, as `YYYY-MM-DD`; its header is marked. |
| `now?` | `{ date: string; minute: number; at: number }` | The present: the day, its minute, and the instant it was read, so the line moves on as time passes and a cached page still draws it where the clock is. |
| `workday?` | `{ start: number; end: number }` | The minutes outside it are shaded, such as `{ start: 540, end: 1080 }`. |
| `scrollTo?` | `number` | The minute the grid opens scrolled to. @default 480 |
| `locale?` | `string` | Formats the day headers and the times a change announces. @default "en" |
| `edit?` | `Edit` |  |
| `pages?` | `{ previous: string; next: string }` | The previous and next ranges' addresses, which a horizontal swipe on a touch screen follows; keep visible arrows beside the grid, since a swipe has no affordance. |
| `labels` | `Labels` |  |

Also accepts everything in `Omit<TagProps<"div">, "children">`.

