Skip to Content

Embed reference

The <whocoming-rsvp> element, its attributes, and what it does on your page.

<script async src="https://cdn.whocoming.com/embed.js"></script>
<whocoming-rsvp event="evt_demo0000000000000001"></whocoming-rsvp>

embed.js is a small loader (under 2 KB gzipped). It registers the <whocoming-rsvp> element, shows a loading card straight away, and fetches the widget itself (under 30 KB gzipped) once, however many elements are on the page.

Attributes

AttributeValuesDefaultNotes
eventEvent IDRequiredThe event to show, such as evt_demo0000000000000001.
themeauto, light, darkautoauto follows the visitor's system setting.
accentHex color, such as #3451f5Organization accent, else neutralButton and focus color. Text on top switches between dark and light for contrast.
compactBooleanOffTighter spacing, no price note or waitlist note, and the button sits beside the title when there is room. For sidebars and lists.
hide-countBooleanOffHides "12 going, 4 spots left".
stringsJSON objectEnglish defaultsOverrides any UI text. See Text and translation.
api-baseURLhttps://api.whocoming.comWhere the widget sends requests. Only for local development against your own server.
sourceembed, pageembedWhere the RSVP is recorded as coming from, shown as the RSVP's source. WhoComing's hosted pages set page; leave it out on your own site. Any other value counts as embed.
no-jsonldBooleanOffStops the widget adding its Event JSON-LD to your page. Use it when the page already has Event markup for this event, so search engines see one Event, not two.

Boolean attributes are on when present: <whocoming-rsvp compact>. compact="false" also counts as off.

Changing an attribute updates the widget in place, so frameworks that re-render attributes just work.

What the guest sees

The card shows the title, date and place in the event's timezone, and the count ("12 going, 4 spots left"). The button opens the form: name, email, plus-ones (when the event allows them), your custom questions, and "Remember me on this device". After sending, the guest sees a confirmation, "Add to calendar" links (Google Calendar, and an .ics file for Apple and Outlook) and their manage link.

The card also handles a full event (with or without a waitlist), an ended or cancelled event, a missing event, and network errors with a retry button.

What it adds to your page

  • Event structured data. For a public, live event, the widget adds one <script type="application/ld+json"> with schema.org Event data to your page, so search engines can show your event in their event results, on your own domain. One script per event, however many widgets show it, removed when the last one goes. If your page already has Event markup for the event, add no-jsonld to the element so search engines do not see it twice.
  • A footer link "RSVP by WhoComing" on the Free and Starter plans. Pro removes it.

Layout and accessibility

The widget fills its container between 280 and 480 pixels wide and adapts to the space it has. All sizes are relative to a fixed 16px base inside the widget, so a host page's own font sizes cannot break it. Inputs are labeled, focus is visible, the result is announced to screen readers, and everything works from the keyboard.

Styles do not leak

The widget renders inside a Shadow DOM. Your page's CSS does not reach in, and the widget's CSS does not reach out. You style it on purpose, through the theming variables and parts.

Local development

To point the widget at your own server instead of https://api.whocoming.com, set api-base on the element, or data-api on the script tag for every element on the page:

<script async src="https://cdn.whocoming.com/embed.js" data-api="http://localhost:3000"></script>

On this page