Skip to content
Sheet
<sessions-sheet>

The final step of booking a class or an appointment, on its own. Most businesses building a bespoke site already have their own activity pages and “book now” buttons — point one at <sessions-sheet> and it opens the same sheet the Sessions schedule uses: registration blocks and waivers (with signatures), booking-spot picking, passes / memberships / gift-card redemption, and Stripe checkout, all themed by your --sessions-* branding. Set session to a session id to book a class. Set activity to a bookable activity id to take an appointment: add start (and optionally end) to open the booking sheet straight on a slot you’ve already chosen — the appointment equivalent of a session-detail sheet — or omit them to show an availability grid scoped to that activity. The sheet opens on mount; when the visitor dismisses it the element emits a sessions:sheet-close event so you can hide its container. Supply an auth token (directly or via a wrapping <sessions-context>) so the booking is made on behalf of the signed-in visitor — anonymous visitors are routed through the business-pinned sign-in flow first. A theatre’s or cinema’s performance carries “All performances”, which opens the show’s whole run over the sheet; picking another night there swaps the sheet to it. That overlay raises no event of its own.

Install

<script type="module" src="https://assets.sessions.website/embeds/unstable/sheet.js"></script>
<sessions-sheet
  business="still-water-yoga-demo"
  session="&lt;session-id>"
></sessions-sheet>

Attributes

Edit any attribute below — the snippet above and the live preview to the side rebuild in place.

business : string

Handle of the business that owns the session or activity, without the leading @. Optional when a wrapping <sessions-context business="…"> already provides it.

session : string

Id of the session (a scheduled class / activity session) to book. Opens the booking + checkout sheet. Takes precedence over activity when both are set.

activity : string

Id of a bookable activity to take an appointment against. On its own, opens the appointment time picker scoped to that one activity; pair with start to skip the picker and open the booking sheet on a specific slot.

start : string

ISO 8601 instant for the start of a pre-chosen appointment slot (used with activity). Opens the booking sheet directly on that slot — the appointment equivalent of a session-detail sheet — instead of the availability grid.

end : string

ISO 8601 instant for the end of the pre-chosen slot. Optional — defaults to the activity’s minimum bookable length (minIncrements × slot length) measured from start.

auth : token

Optional embed-scoped JWT issued via the business-pinned sign-in flow. When set, the booking is made on behalf of the token holder; when omitted, the visitor signs in (or checks out as a guest) inside the sheet.

Methods

show(): void
Open the sheet again after the visitor closed it, from what it already loaded — keep the element on the page and call this from your “Buy tickets” button rather than adding a second <sessions-sheet>. Does nothing while the sheet is open.

Events

Each is its own Event subclass, dispatched on the element. Read the state it changed from the element: event.target.selection. What isn’t state, like the booking just made, is on the event itself: event.booking, never event.detail. They bubble and cross shadow roots, so you can listen on the element or any ancestor. Outside a shadow root that holds the element, event.target is that root’s host, so read the element from event.composedPath()[0].

sessions:sheet-close
SessionsSheetCloseEvent
The visitor dismissed the sheet — hide its container or restore your own UI.

Content Security Policy

If your site sets a Content-Security-Policy, allow these origins: the embed loads its files from assets.sessions.website, calls the Sessions API on go.sessions.website, and frames sign-in and maps from embed.sessions.website. It also renders a card-payment form and (for guest checkout) a Cloudflare bot-challenge widget, and runs the business’s apps in hidden, sandboxed frames from go.sessions.website. Allow those origins too, or the payment form, challenge, or app rows will be blocked.

script-src https://assets.sessions.website https://challenges.cloudflare.com;
connect-src https://assets.sessions.website https://go.sessions.website;
frame-src https://embed.sessions.website https://challenges.cloudflare.com https://go.sessions.website;