v1.19.0 - Show and style labels above the card fields with the new showCardFieldLabels and cardFieldLabels props #
Show visible labels above the hosted card number, expiry, security code and name fields with the new `showCardFieldLabels` prop, change their text with `cardFieldLabels`, and style them with your existing `appearance.rules['.Label']` rule. The props are available on the embedded checkout and on SplitCardForm in @flopay/react and @flopay/vue. The labels stay hidden unless you turn them on.
24 Nov 2026
Show visible labels above the hosted card fields with the new showCardFieldLabels prop, and choose their wording with cardFieldLabels. Buyers see what each field is for even after they start typing, and the labels follow the same .Label style you already use for the rest of your checkout.
What changed
- React and Vue. The embedded checkout component and
SplitCardFormin@flopay/reactand@flopay/vueacceptshowCardFieldLabelsandcardFieldLabels. SetshowCardFieldLabelstotrueto show the labels;falsehides them again. The embedded checkout forwards both props to its built-in card form; aSplitCardFormyou render in a custom layout takes its own. - Label text.
cardFieldLabelsis an object with optionalnumber,expiry,cvvandnametext. Only the fields you set are sent, exactly as given, and the hosted form shows the text literally. A field you leave out keeps the hosted form's default wording, and removing the prop restores all of them. - Label style. The supported properties of
appearance.rules['.Label']style the labels:color,fontSize(px),fontWeight(a number,normalorbold),letterSpacing(em),textTransform, andmarginBottomas the gap between the label and its field (px). Every other.Labelproperty is ignored without an error. The preset themes already style.Label, so their label style applies as soon as the labels are shown. - Live updates. Changing either prop updates the card form in place, without remounting it or clearing card details the buyer has already entered. The latest settings are sent again whenever the hosted form reloads.
@flopay/js. The hosted card capture addssetShowCardFieldLabels(show)andsetCardFieldLabels(labels), which show or hide the labels and set their text live. The optional controls and theCardFieldLabelstype are also in@flopay/shared.- Security. Like the submit label, the label settings are bound to the checkout session and sent only to the hosted form's exact origin.
Integration notes
- No action is needed. The labels are off by default, so a checkout that does not set
showCardFieldLabelslooks and behaves exactly as before. - To show the labels, add
showCardFieldLabelsto the embedded checkout component orSplitCardForm(Vue:showCardFieldLabels: true), and optionallycardFieldLabels, for example{ number: 'Card number', expiry: 'Valid until', cvv: 'Security code' }. The@flopay/react,@flopay/vueand@flopay/jsREADMEs show the details and the full list of supported.Labelproperties.