Skip to main content
The 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: true and unchecked → complete: false with a required error.
  • required: true and checked → complete: true.
  • No required, no validatecomplete: true regardless of state.
  • With validatecomplete: true only when the callback returns null.

Value

A checkbox always has a state. The emitted value is always boolean, never null. The change envelope, the submit envelope, and the imperative element.value getter all return the same boolean.

Inside Checkout

See also

Last modified on July 17, 2026