Skip to content
Docs
Reference

<tl-buy-modal>

The buy-tickets modal: a date, then tickets, then payment, under a header carrying the channel's and the event's identity, beside a basket showing what the buyer is paying for.

HTML tag<tl-buy-modal>
Reactimport { TlBuyModal } from '@ticketlayer/elements-react'
CategoryPurchase
Runs inweb (browser DOM)

The buy-tickets modal: a date, then tickets, then payment, under a header carrying the channel's and the event's identity, beside a basket showing what the buyer is paying for. The hosted checkout opens inside it where the page allows.

Properties#

PropertyAttributeDescriptionTypeDefault
channelHeaderchannel-headerWhether and how the channel's logo and name are drawn above the event: hidden, over the blurred image, or on the primary colour. Defaults to the channel theme's design.modalHeader.channel, then hidden"blurred" | "hidden" | "plain" | undefinedundefined
eventId (required)event-idEvent to sell tickets forstringundefined
headerheaderHow the event band is drawn: the event image blurred behind a square of it, or plain on the background. Defaults to the channel theme's design.modalHeader.event, then blurred"blurred" | "plain" | undefinedundefined
occurrenceIdoccurrence-idOptionally open straight to ticket selection for this occurrencestring | undefinedundefined
paymentReturnpayment-returnA payment method coming back to the page: open straight on payment to finish it. Set bystring | undefinedundefined
sizesizeA fixed 1040 by 640 frame that keeps its size through every step, or nearly the whole screen. Full screen on a phone either way"fixed" | "wide"'fixed'
unstyledunstyledRender into the light DOM with no stylesheet, for a page that styles the element itself: every node carries a tl-buy-modal__* class. Without it the element is styled, and each node is a ::part() of the same name.booleanfalse

Events#

EventDescriptionType
tlCheckoutThe tickets are in the cart and the host's own checkout takes over (the page cannot show the checkout inside the modal)CustomEvent<void>
tlCloseThe buyer dismissed the modalCustomEvent<void>
tlCompleteThe buyer paid, inside the modal; the modal shows its confirmationCustomEvent<{ order: unknown; }>
tlErrorThe event or its tickets couldn't be loaded, the tickets couldn't be added, or the checkout couldn't be openedCustomEvent<{ message: string; }>

Events are CustomEvents; the payload is on event.detail. In HTML, listen with element.addEventListener('tlXxx', handler); in React the wrapper exposes each one as an onTlXxx prop.

Renders: <tl-occurrence-selector>, <tl-ticket-selector>, <tl-seat-explorer>, <tl-best-available>, <tl-cart>, <tl-promo-code>, <tl-concierge-slot>, <tl-seat-view>