#
CardOptions
#
An interface that declares the properties used to customize the appearance and behavior of the card entry form. For more information about applying custom styles to the card form, see the available CardClassSelectors for styling.
Properties
cardOptions.js
JS
JavaScript
const cardOptions = getCardOptions();
const card = await payments.card(cardOptions);
function getCardOptions() {
return {
"postalCode" : "12345",
"style": {
"input": {
"color": "red",
},
// You can use media queries with valid selectors:
"@media screen and (max-width: 600px)": {
"input": {
"fontSize": "12px",
}
}
},
};
};