Korean Card Expiry Date Element
createElement('krCardExpiry', options?)
Parameters
type
required'krCardExpiry'options
optionalKRCardExpiryDateElementOptionskrCardExpiry Element.disabled
optionalbooleankrCardExpiry Element input is disabled or not.falseplaceholder
optionalstringstyle
optionalInputStylebase
optionalPseudoClassStyle & CSSPropertiesinvalid
optionalCSSPropertiespopupHeight
optionalnumberpopupWidth
optionalnumbervalid
optionalCSSPropertiesReturns
KRCardExpiryDateElement | null
1import { init, createElement } from '@airwallex/components-sdk';23await init({4 env: 'prod',5 enabledElements: ['payments'],6});78const element = await createElement('krCardExpiry');910element.mount('kr-card-expiry-container');
blur()
1element.blur();
clear()
1element.clear();
destroy()
1element.destroy();
focus()
1element.focus();
mount(domElement)
Parameters
domElement
requiredstring | HTMLElementReturns
HTMLElement | null
1// There are two ways to mount the element:2// 1. Call with the container DOM id3element.mount('container-dom-id');45// 2. Find the created DOM in the existing HTML and call with the container DOM element6const containerElement = document.getElementById('container-dom-id');7element.mount(containerElement);
on('ready', handler)
Parameters
type
required'ready'handler
required() => void1element.on('ready', () => {2 console.log('Element is ready');3 });
on('change', handler)
Parameters
type
required'change'handler
requiredfunctionThe callback function that will be called when the event occurs.
The handler receives an object with the following properties:
detail
requiredobjectcompleted
requiredbooleanempty
requiredbooleanerror
requiredobjectcode
requiredstringmessage
requiredstring1element.on('change', (e) => {2 const { completed, empty, error } = e.detail;3 console.log('Form changed', { completed, empty, error });4 });
on('focus', handler)
Parameters
type
required'focus'handler
requiredfunctionThe callback function that will be called when the event occurs.
The handler receives an object with the following properties:
detail
requiredobjectcompleted
requiredbooleanempty
requiredbooleanerror
requiredobjectcode
requiredstringmessage
requiredstring1element.on('focus', (e) => {2 const { completed, empty, error } = e.detail;3 console.log('Form focused', { completed, empty, error });4 });
on('blur', handler)
Parameters
type
required'blur'handler
requiredfunctionThe callback function that will be called when the event occurs.
The handler receives an object with the following properties:
detail
requiredobjectcompleted
requiredbooleanempty
requiredbooleanerror
requiredobjectcode
requiredstringmessage
requiredstring1element.on('blur', (e) => {2 const { completed, empty, error } = e.detail;3 console.log('Form blurred', { completed, empty, error });4 });
on('pressArrowKey', handler)
Parameters
type
required'pressArrowKey'handler
requiredfunctionThe callback function that will be called when the event occurs.
The handler receives an object with the following properties:
detail
requiredobjectarrowKey
requiredstring1element.on('pressArrowKey', (e) => {2 const { arrowKey } = e.detail;3 console.log('Arrow key pressed', arrowKey);4 });
on('submit', handler)
Parameters
type
required'submit'handler
required() => void1element.on('submit', () => {2 console.log('Form submitted');3 });
unmount()
1element.unmount();
update(options?, initOptions?)
Parameters
options
optionalKrCardExpiryDateElementOptionsdisabled
optionalbooleankrCardExpiry Element input is disabled or not.falseplaceholder
optionalstringstyle
optionalInputStylebase
optionalPseudoClassStyle & CSSPropertiesinvalid
optionalCSSPropertiespopupHeight
optionalnumberpopupWidth
optionalnumbervalid
optionalCSSPropertiesinitOptions
optionalInitOptionsenv
optional'demo' | 'prod''prod'fonts
optionalFontOptions[]family
optionalstringThe font-family property, for example, AxLLCircular.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
src
optionalstringThe font-source property, for example, https://checkout.airwallex.com/fonts/CircularXXWeb/CircularXXWeb-Regular.woff2.
https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face
weight
optionalstring | numberThe font-weight property. Supported font weights include: regular (400) and bold (700). https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
locale
optionalenumar
da
de
en
es
fi
fr
he
id
it
ja
ko
ms
nl
pl
pt
ro
ru
si
sv
tr
vi
ur
zh
zh-HK
origin
optionalstringDeprecated1element.update({2 placeholder: 'replace-with-your-placeholder',3});