Skip to content
Docs
Reference

<tl-buy-tickets-wrapper>

Wrap any content and open the purchase modal when it is activated.

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

Wrap any content and open the purchase modal when it is activated.

Wraps any content and opens the Ticketlayer modal when clicked. Uses the SDK's modal manager which handles the iframe overlay.

Properties#

PropertyAttributeDescriptionTypeDefault
disableddisabledWhether the wrapper is disabledbooleanfalse
eventId (required)event-idThe event ID to purchase tickets forstringundefined
occurrenceIdoccurrence-idOptional specific occurrence ID (skips occurrence selector)string | undefinedundefined

Events#

EventDescriptionType
tlCloseEmitted when the modal closesCustomEvent<void>
tlCompleteEmitted when purchase completes successfullyCustomEvent<OrderResult>
tlErrorEmitted when an error occursCustomEvent<{ 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.

Slots#

SlotDescription
Content to display (typically a button)