Factories
Shared options
Every custom element extends the same base:Value shapes
text, number, and select emit null while empty or mid-typing an unparseable value. checkbox always has a state.
Events
Custom elements support the same six core events as built-in elements:onReady, onChange, onSubmit, onError, onFocus, onBlur, plus onEscapeKeyPressed. Wallet-only events (onClick, onExit) are not emitted.
Validation
- Without
validate, the only built-in check is the synchronousrequiredempty check (unchecked-box oncheckbox). Format checks are intentionally not provided because custom elements collect arbitrary merchant-defined data. numberadds built-inminandmaxrange checks whenvalidateis not supplied.selectaccepts only values that match one ofoptions[].value.- Providing
validateskips every built-in check. The callback receives the current value (includingnullfor empty inputs) and owns the entire validity contract. Returnnullfor valid, or a non-empty string to surface aFieldErrorwithcode: 'custom'.
FieldError
field always equals the element’s name. Bucket errors by field to place them next to the matching input.
Imperative .value getter
Every custom element handle exposes a read-only .value property returning the current snapshot.
text,number,selectreturnnullwhen empty.checkboxalways returns aboolean.
Inside Checkout
Custom elements can be configured undercustomElements on overflow.checkout(). Each slot appears on the aggregated envelope as:
checkout.getCustomElement(name).
Inside Checkout, appearance is not allowed on custom slots. Style the whole Checkout as one cohesive unit; see Theming.
Duplicate names
Two elements with the samename on the same Overflow instance log a warning; the second one returns a no-op handle. Its mount, on, update, and submit calls are silently ignored.