All components (283)
Year agenda
Dates and time · YearAgenda · .amset-yearagenda
What it is and when to use it
The whole year at a glance: twelve small months, with the days that have something marked. To see where activity concentrates and jump to a day.
When to use it
- Bookings, holidays, public holidays: what is looked at across the year.
eventsare the events (only how many fall on each day matters), andonDaySelecthands over the chosen day.yearis carried by whoever uses it;initialYeargives the starting one. Without either, the current one, known on reaching the browser.
When not to
- Seeing what is on a day:
MonthAgendaorWeekAgenda. - Choosing a date in a form:
DatePicker.
Keyboard: a single tab stop on the days. The arrows move, also from one month and year to another; Page Up and Page Down change month; Enter and Space choose.
Accessibility: each month is a grid with its name and each day says its full date and how many events it has. Having something does not rely on colour alone: it goes bold and underlined.
Fine-tuning: --amset-yearagenda-day is the size of a day.
What it looks like
2026
<YearAgenda
label="Bookings"
events={[{ key: "a", date: "2026-01-15" }, { key: "b", date: "2026-03-03" }]}
initialYear={2026}
/>Props
Import it with import { YearAgenda } from '@amset/ui'. Required props are marked.
| Prop | Type | What it does |
|---|---|---|
eventsrequired | readonly YearAgendaEvent[] | The events: only how many fall on each day matters. |
labelrequired | string | What is being shown: "Bookings". Required. |
className | string | Merged with the library classes; it does not replace them. |
initialYear | number | The starting year. Without this, the current one, known on reaching the browser. |
onDaySelect | (iso: string) => void | Called on choosing a day, with its `YYYY-MM-DD` date. |
onYearChange | (year: number) => void | — |
selectedDay | string | The marked day. |
year | number | The year, controlled. |
It also accepts the attributes of the element it renders: className, style, data-*, aria-* and its events.
CSS variables
These CSS variables are how you adapt it. Declare them on the component's selector, not on :root: the stylesheet redeclares them in the rule itself, and a declaration on the same element always wins.
| Variable | Default |
|---|---|
--amset-yearagenda-day | 1.75rem |
How to change it
.amset-yearagenda {
--amset-yearagenda-day: ...;
}In the test bench
Every state and variant, to try one at a time, on its page at storybook.amsetui.com:
