Skip to main content

<tl-ticket-selector>

HTML tag<tl-ticket-selector>
Reactimport { TlTicketSelector } from '@ticketlayer/elements-react'
CategoryPurchase
Runs inweb (browser DOM), native (planned React Native set)

Properties

PropertyAttributeDescriptionTypeDefault
buttonLabelbutton-labelButton labelstring'Add to Cart'
eventId (required)event-idEvent IDstringundefined
occurrenceId (required)occurrence-idOccurrence IDstringundefined
showButtonshow-buttonShow add to cart buttonbooleantrue

Events

EventDescriptionType
tlAddToCartEmitted when items are added to cartCustomEvent<{ items: AddToCartItem[]; }>
tlErrorEmitted on errorCustomEvent<{ message: string; }>
tlQuantityChangeEmitted when quantity changesCustomEvent<{ ticketTypeId: string; quantity: number; total: number; }>

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.

Used by: <tl-buy-modal>