Learn about customisation options for the dynamic card image component.
const dynamicCardImageConfig: DynamicCardImageComponentConfig = {
frontDynamicCardImageBackground: string,
backDynamicCardImageBackground: string,
cardNumberText: string,
cardExpiryDateText: string,
cardHolderNameText: string,
cvcText: string,
textStyling: CSSProperties,
bankNameTextStyling: CSSProperties,
cardNumberTextStyling: CSSProperties,
expiryDateLabelTextStyling: CSSProperties,
expiryDateValueTextStyling: CSSProperties,
holderNameTextStyling: CSSProperties,
cvcLabelTextStyling: CSSProperties,
cvcValueTextStyling: CSSProperties,
highlightFieldStyling: CSSProperties,
cardNumberComponent: CardNumberComponent,
cardExpiryDateComponent: CardExpiryDateComponent,
cardCvcComponent: CardCvcComponent,
cardHolderNameComponent: CardHolderNameComponent,
};| Property | Description |
|---|---|
cardNumberTextstring | The label for the number field on the card. |
cardExpiryDateTextstring | The label for the expiry date on the card. |
cardHolderNameTextstring | The label for the cardholder name on the card. |
cvcTextstring | The label for the CVC field on the card. |
frontDynamicCardImageBackgroundstring | The URL for the image on the front of card. |
backDynamicCardImageBackgroundstring | The URL for the image on the back of the card (CVC side). |
textStylingCSSProperties | General text styling for the card text. |
cvcLabelTextStylingCSSProperties | The text styling for the CVC label. |
cvcValueTextStylingCSSProperties | The text styling for the CVC value. |
bankNameTextStylingCSSProperties | The text styling for the bank name. |
cardNumberTextStylingCSSProperties | The text styling for the card number. |
expiryDateLabelTextStylingCSSProperties | The text styling for the expiry label. |
expiryDateValueTextStylingCSSProperties | The text styling for the expiry value. |
holderNameTextStylingCSSProperties | The text styling for the cardholder name. |
highlightFieldStylingCSSProperties | The styling for the field when highlighted. |
cardNumberComponentCardNumberComponent | Component for the card number field. See Card number. |
cardExpiryDateComponentCardExpiryDateComponent | Component for the card expiry date. See Card expiry date. |
cardCvcComponentCardCvcComponent | Component for the CVC field. See Card CVC. |
cardHolderNameComponentCardHolderNameComponent | Component for the cardholder name field. See Cardholder name. |
const dynamicCardImageConfig: DynamicCardImageComponentConfig = {
cardNumberText: "1234 5678 9012 3456",
cardExpiryDateText: "MM/YY",
cardHolderNameText: "JOHN SMITH",
cvcText: "123",
frontDynamicCardImageBackground: "/images/card-front-bg.png",
backDynamicCardImageBackground: "/images/card-back-bg.png",
textStyling: {
fontFamily: "monospace",
fontSize: "14px",
color: "#ffffff"
},
cardNumberTextStyling: {
fontSize: "18px",
fontWeight: "bold",
letterSpacing: "2px",
color: "#ffffff"
},
holderNameTextStyling: {
fontSize: "12px",
textTransform: "uppercase",
fontWeight: "600",
color: "#ffffff"
},
expiryDateLabelTextStyling: {
fontSize: "8px",
color: "#cccccc"
},
expiryDateValueTextStyling: {
fontSize: "12px",
fontWeight: "500",
color: "#ffffff"
},
cvcLabelTextStyling: {
fontSize: "8px",
color: "#cccccc"
},
cvcValueTextStyling: {
fontSize: "12px",
fontWeight: "500",
color: "#333333"
},
bankNameTextStyling: {
fontSize: "10px",
fontWeight: "bold",
color: "#ffffff"
},
highlightFieldStyling: {
color: "#ffd700",
textShadow: "0 0 4px rgba(255, 215, 0, 0.5)"
},
cardNumberComponent: cardNumberComponent,
cardExpiryDateComponent: cardExpiryDateComponent,
cardCvcComponent: cardCvcComponent,
cardHolderNameComponent: cardHolderNameComponent
};