Composite

EventLayout

The body of an event page: when and where, a Register button, and a map.

With registration and map

registrationUrl adds the Register button above the body. Coordinates in location add a Map after it.

Collections launch meetup

Example Hall · Gran Vía 1, Madrid

Doors open at six. Bring a laptop if you want to follow along.

register
---
import EventLayout from '@alfadormx/blocks/composite/EventLayout.astro';
---

<EventLayout
  headline={{ title: 'Collections launch meetup', htmlTag: 'h2' }}
  start={new Date('2030-03-12T17:00:00Z')}
  end={new Date('2030-03-12T19:00:00Z')}
  timezone="Europe/Madrid"
  location={{
    name: 'Example Hall',
    address: 'Gran Vía 1, Madrid',
    lat: 40.4203,
    lon: -3.7058,
  }}
  registrationUrl="https://example.com/register/launch"
>
  <p>Doors open at six. Bring a laptop if you want to follow along.</p>
</EventLayout>

Without the button

registerButton: false hides the button even when a URL is set.

Accessibility webinar

Online

The recording is coming soon.

no-register
---
import EventLayout from '@alfadormx/blocks/composite/EventLayout.astro';
---

<EventLayout
  headline={{ title: 'Accessibility webinar', htmlTag: 'h2' }}
  start={new Date('2026-02-04T15:00:00Z')}
  end={new Date('2026-02-04T16:00:00Z')}
  timezone="Europe/Madrid"
  location={{ name: 'Online' }}
  registrationUrl="https://example.com/register/webinar"
  registerButton={false}
>
  <p>The recording is coming soon.</p>
</EventLayout>

API Reference

PropTypeDefaultDescription
headlineHeadlineProps—Entry title (default: htmlTag 'h1').
imageImageProps—Cover image above the title.
tagsstring[]—Tags under the body (default: []).
langCodestring—Language of the layout's dates and UI strings (default: the site's default language).
classstring—Classes on the layout root (`data-entry-layout`).
bodyClassstring—Classes on the Markdown body wrapper (`data-entry-body`), merged after `prose`; use typography modifiers such as `prose-lg` or `max-w-none`.
tagsClassstring—Classes on the tags list (`data-entry-layout-tags`).
startDate—Start date and time.
endDate—End date and time; a same-day end shows as a time range.
timezonestring'UTC'IANA time zone the times are shown in (default: 'UTC'; the page helpers pass the event's or the site's zone).
locationEntryLocation—Venue; its name and address follow the date in the meta line, and coordinates add a Map.
registrationUrlstring—Registration link; the Register button renders when it is set.
registerButtonOmit<ButtonProps, 'href'> | false—Register Button above the body; `false` hides it (default: solid primary, per-language "Register").
mapOmit<MapProps, 'lat' | 'lon'> | false—Map shown when `location` has coordinates; `false` hides it (default: zoom from the location or 13, height '320px').