| |
|---|
| HTML tag | <tl-event-card> |
| React | import { TlEventCard } from '@ticketlayer/elements-react' |
| Category | Discovery |
| Runs in | web (browser DOM), native (planned React Native set) |
Properties
| Property | Attribute | Description | Type | Default |
|---|
event | -- | Event data to display (tl-event-list passes this) | TlEventCardEvent | undefined | undefined |
eventId | event-id | Load the event from the SDK by id when no event is given, so a single card works standalone (e.g. on a Webflow page). | string | undefined | undefined |
Events
| Event | Description | Type |
|---|
tlClick | Emitted when the card is clicked | CustomEvent<{ eventId: string; }> |
tlError | Emitted when the event could not be loaded by id | 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.
Used by: <tl-event-list>