Event Calendar
ProNewSupplied events as a date-led list, photo grid, masonry wall, scrollable slider, month grid or week schedule, with category filters, details and .ics download.
Installation
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
Props
| Prop | Type | Default |
|---|---|---|
| events* | CalendarEvent[] | — |
| layout | "list" | "cards" | "masonry" | "slider" | "month" | "week"`list` is date-led rows; `cards`, `masonry` and `slider` show event cards; `month` and `week` are calendars. | "list" |
| title | stringHeading above the calendar. | — |
| categories | EventCategory[]Names and colors of the categories, in filter order. Defaults to the ones found in `events`. | — |
| filter | booleanShows the category filter. | true |
| weekStart | 0 | 1First day of the week: 0 is Sunday, 1 is Monday. | 0 |
| hour12 | boolean12-hour times with AM and PM. | true |
| locale | string | "en-US" |
| defaultDate | stringDay the `month` and `week` layouts open on, as `2026-11-24`. Defaults to today. | — |
| now | string | DateOverrides the current time, for tests and screenshots. | — |
| loading | booleanShows placeholders while the events load. | false |
| onAddToCalendar | (event: CalendarEvent) => voidReplaces the built-in .ics download behind “Add to Calendar”. | — |
| className | string | — |
Accessibility
- Every event is a button named with its title, date and time; it opens a dialog that traps focus and returns it on close.
- The month is a real table with weekday headers. On small screens each day is a toggle button that says how many events it has, and that day's events are listed below.
- The week and slider scroll inside their own focusable regions, so the page never does; the slider supports arrow keys and named previous/next buttons.
- Category chips are toggle buttons and never rely on color alone. The details panel and backdrop enter together; no fades, rises or zoom under reduced motion.
- Action/directions URLs accept safe schemes only; a bad directions target falls back to a map search.