| |
|---|
| HTML tag | <tl-buy-tickets-wrapper> |
| React | import { TlBuyTicketsWrapper } from '@ticketlayer/elements-react' |
| Category | Purchase |
| Runs in | web (browser DOM) |
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 |
|---|
tl-close | Emitted when the modal closes | CustomEvent<void> |
tl-complete | Emitted when purchase completes successfully | CustomEvent<OrderResult> |
tl-error | 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) |