# YearView

> A calendar's year: twelve small months in a grid that reflows from four columns to one, each day a link with a dot whose weight follows how busy the day is, today ringed and the chosen day filled, so a year reads at a glance and any day is one tap away.

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

Renders the year: a heading per month (a link when `monthHref` is set) over its weekday
initials and day links. Dots grow and darken with a day's count, so busy stretches show as
texture across the year.

## Examples

```tsx
<YearView year={2026} today="2026-11-18" counts={{ "2026-11-18": 4 }} dayHref={(date) => `/day/${date}`}
	labels={{ count: "{count} events" }} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `year` | `number` |  |
| `counts?` | `Record<string, number>` | Events per day, keyed `YYYY-MM-DD`; a day missing from it is free. |
| `today?` | `string` | Today, as `YYYY-MM-DD`, ringed. |
| `selected?` | `string` | The chosen day, as `YYYY-MM-DD`, filled. |
| `dayHref` | `(date: string) => string` | Where a day leads, such as its day view. |
| `monthHref?` | `(month: string) => string` | Where a month's name leads, such as its month view; plain text without it. |
| `weekStartsOn?` | `0 \| 1` | 0 for Sunday, 1 for Monday. @default 0 |
| `locale?` | `string` |  |
| `labels` | `Labels` |  |

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

