Block 83 of 297
Event List
Upcoming events with date tiles, times, locations and categories.
- Puck key
- EventListBlock
- Export
- eventListBlock
- React component
- <EventList />
- Path
- components/puck/event-list-block.tsx
- Dependencies
- None
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
A stacked list of upcoming events, each row led by a calendar tile showing month and day, followed by an optional category tag, the title, time and location. When an event has a link, the whole row becomes clickable. It fits event roundups on home pages and department pages where a full calendar would be too much.
- The next few events on a parks or library home page
- Public meetings and hearings on a city department page
- Volunteer days or family programs on a nonprofit's landing page
Writing the content
- Add 1 to 12 Events; four to six reads well, with All events link text for the rest.
- Keep Month to three letters like OCT so the tile stays narrow. Rows with no Title are skipped.
- Fill Machine-readable date in YYYY-MM-DD format. The tile then renders as a time element that software can read.
- Leave Event link blank for events without a detail page; the row stays plain text and the arrow circle disappears.
Accessibility
- Event titles are headings one level below the section's Heading level, so a screen reader user can jump between events.
- The title link stretches over the whole row, so each event is one link with a focus outline around the row (WCAG 2.4.7).
- Time and location are a description list with hidden "Time" and "Location" terms, and the icons are hidden from assistive tech.
Customizing the code
- The tile header and category tag use indigo-600 and indigo-50; swap the indigo- family for your brand color.
- Tile width is w-16 sm:w-20. Widen it if you prefer full month names.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- All events link texttext
- All events linktext
- Eventsarray