Skip to content
Docs
Reference

<tl-best-available>

The best seats for a party: a few options that differ (the best, a cheaper one, one closer or further back), each with the view from it, the row and seats, why it was chosen and the price.

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

The best seats for a party: a few options that differ (the best, a cheaper one, one closer or further back), each with the view from it, the row and seats, why it was chosen and the price. Hovering an option rings its seats on tl-seat-explorer; taking it holds them and pins the seat card. "How many tickets?" and the preferences sit above the options unless turned off, and follow the same choices wherever else they are placed on the page.

Properties#

PropertyAttributeDescriptionTypeDefault
eventIdevent-idThe event, for its pricesstring | undefinedundefined
occurrenceId (required)occurrence-idThe occurrence to find seats instringundefined
optionsoptionsHow many options to shownumber3
quantityquantityHow many tickets to start withnumber2
showPreferencesshow-preferencesShow the preferences under "How many tickets?"booleantrue
showQuantityshow-quantityShow "How many tickets?" above the optionsbooleantrue
staffstaffBox office mode: one option at a time with "Next best", a keypad for how many, the channel's own number of options, and a single seat gap sold after a confirm where the client allows itbooleanfalse
unstyledunstyledRender into the light DOM with no stylesheet, for a page that styles the element itself: every node carries a tl-best-available__* class. Without it the element is styled, and each node is a ::part() of the same name.booleanfalse

Events#

EventDescriptionType
tlErrorSuggestions could not be found, or an option could not be heldCustomEvent<{ message: string; }>
tlOptionSelectAn option was taken and its seats are heldCustomEvent<{ seats: number[]; facet: 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.

Renders: <tl-quantity-picker>, <tl-seat-preferences>

Used by: <tl-buy-modal>