Skip to content
Docs
Reference

<tl-quantity-picker>

How many tickets: square buttons 1 to 5 and a 6+ dropdown up to the channel's limit, or a keypad for staff.

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

How many tickets: square buttons 1 to 5 and a 6+ dropdown up to the channel's limit, or a keypad for staff. Two are chosen to start with, and layout="keypad" gives the keypad, for a counter. tl-best-available on the same page follows the number chosen, wherever each is placed.

Properties#

PropertyAttributeDescriptionTypeDefault
layoutlayoutSquare buttons and a dropdown, or a keypad (for staff at a counter)"buttons" | "keypad"'buttons'
maxmaxThe most that may be chosen, when lower than the channel's limitnumber | undefinedundefined
occurrenceId (required)occurrence-idThe occurrence the tickets are forstringundefined
quantityquantityThe number chosen to start withnumber2
unstyledunstyledRender into the light DOM with no stylesheet, for a page that styles the element itself: every node carries a tl-quantity-picker__* class. Without it the element is styled, and each node is a ::part() of the same name.booleanfalse

Events#

EventDescriptionType
tlQuantityChangeA number of tickets was chosenCustomEvent<{ quantity: 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-best-available>