checkbox custom element renders a native <input type="checkbox"> with an aligned label. Use it for consent rows, opt-ins, or any boolean toggle in the payment form.
Factory
Example
Options
mode
'inline'(default) renders the checkbox on the leading edge with the label to its right. The entire row is clickable. Best for consent rows where the label reads as a sentence.'stacked'renders the label above the checkbox, matching the layout of other custom inputs. Use this when the checkbox needs to align with text inputs in a form grid.
required semantics
required: true means “must be checked”, matching the native HTML <input type="checkbox" required> semantic. Use it for terms-and-conditions style hard consents. An unchecked box surfaces a FieldError with code: 'required' and submit() rejects with code: 'validation_failed'. Leave required unset for optional opt-ins and read the boolean off the change event.
complete semantics
required: trueand unchecked →complete: falsewith arequirederror.required: trueand checked →complete: true.- No
required, novalidate→complete: trueregardless of state. - With
validate→complete: trueonly when the callback returnsnull.
Value
boolean, never null. The change envelope, the submit envelope, and the imperative element.value getter all return the same boolean.