| |
|---|
| HTML tag | <tl-cart-drawer> |
| React | import { TlCartDrawer } from '@ticketlayer/elements-react' |
| Category | Cart |
| Runs in | web (browser DOM) |
Properties
| Property | Attribute | Description | Type | Default |
|---|
heading | heading | Heading shown at the top of the panel. | string | 'Your cart' |
open | open | Controlled open state (also driven by the ui:cart-requested intent). | boolean | false |
side | side | Edge the panel slides in from. | "left" | "right" | 'right' |
Events
| Event | Description | Type |
|---|
tlClose | | CustomEvent<void> |
tlOpen | | CustomEvent<void> |
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-cart>