Elements
Creates one elements group for the element components inside it, and destroys it when it is destroyed.
Export it to a template variable to pay from the component that renders it:
#checkout="pesepayElements", then checkout.instance() and
checkout.elements(). Both are null until Pesepay loads.
Nothing loads before the first render in the browser: on the server the elements inside render empty.
export declare class ElementsInputs and outputs
Section titled “Inputs and outputs”| Name | Type | Description |
|---|---|---|
elements | Signal<Elements$1 | null> | The elements group, created once Pesepay has loaded. |
instance | Signal<Pesepay | null> | The Pesepay instance once it has loaded. |
options | InputSignal<ElementsOptions | undefined> | Applied to every element inside. A change is passed to elements.update(). |
pesepay | InputSignal<Pesepay | PromiseLike<Pesepay | null> | null | undefined> | What loadPesepay() returns: the promise itself, or the instance once it has resolved. Leave it out and Pesepay loads with the default options; pass loadPesepay({ ... }) to set any of them. Call loadPesepay() once, in a field, not in the template. Fixed on first render: a different value later is ignored with a warning. |