Block 09 of 297
Event Hero
One event up front: calendar-page date stamp over a photo, time, location, cost, register and add-to-calendar links.
- Puck key
- HeroEventBlock
- Export
- heroEventBlock
- React component
- <HeroEvent />
- Path
- components/puck/hero-event-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
Puts a single event at the top of the page: title and description, a ruled list of time, location and cost, a register button and an add-to-calendar link. A calendar-page date stamp overlaps the corner of the photo, or sits above the title when there's no photo. On phones the photo and stamp come first, followed by the details.
- A festival, gala or fundraiser landing page
- A public meeting, cleanup day or open house announcement
- The featured event at the top of an events listing
Writing the content
- Fill in Date (machine-readable) as YYYY-MM-DD even though it isn't shown; the Month and Day fields are what visitors see.
- Time, Venue and Cost each hide when blank, and Address appears only under the venue, so include just what people need to show up.
- Point the Calendar link at an .ics file or a Google Calendar event link, and leave Calendar link text blank if you have neither.
- Use the Eyebrow for the series or organizer rather than repeating the date.
Accessibility
- The date stamp is a time element whose datetime attribute comes from the machine-readable date, so the date is unambiguous to software.
- Detail rows are a description list; each icon is aria-hidden and paired with a screen-reader-only label (Time, Location, Cost), so meaning doesn't rest on the icon (WCAG 1.1.1, 1.3.1).
- Register and calendar links have visible focus outlines and a 44px minimum height.
Customizing the code
- The stamp's month band and the detail icon tiles use indigo-600 and indigo-50; swap them for your brand color.
- Photo shape is aspect-4/3 on phones and lg:aspect-5/6 on desktop; the stamp tilt is -rotate-3.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Event titletextarea
- Heading levelselect
- Descriptiontextarea
- Date (machine-readable)text
- Monthtext
- Daytext
- Weekdaytext
- Timetext
- Venuetext
- Addresstext
- Costtext
- Register button texttext
- Register linktext
- Calendar link texttext
- Calendar linktext
- Image URLtext
- Image alt texttext