Reference
<tl-buy-tickets-wrapper>
Wrap any content and open the purchase modal when it is activated.
| HTML tag | <tl-buy-tickets-wrapper> |
| React | import { TlBuyTicketsWrapper } from '@ticketlayer/elements-react' |
| Category | Purchase |
| Runs in | web (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#
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
disabled | disabled | Whether the wrapper is disabled | boolean | false |
eventId (required) | event-id | The event ID to purchase tickets for | string | undefined |
occurrenceId | occurrence-id | Optional specific occurrence ID (skips occurrence selector) | string | undefined | undefined |
Events#
| Event | Description | Type |
|---|---|---|
tlClose | Emitted when the modal closes | CustomEvent<void> |
tlComplete | Emitted when purchase completes successfully | CustomEvent<OrderResult> |
tlError | Emitted when an error occurs | CustomEvent<{ 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#
| Slot | Description |
|---|---|
| Content to display (typically a button) |