← All releases

Show and style labels above the card fields

The new showCardFieldLabels and cardFieldLabels props, and the setShowCardFieldLabels and setCardFieldLabels methods, show visible labels above the hosted card number, expiry, security code and name fields and change their text. The .Label rule of appearance.rules styles them. Merchants who do not turn them on see no change.

Checkout APISDK

You can now show a visible label above each hosted card field with the showCardFieldLabels prop, change the label text with cardFieldLabels, and style the labels with the .Label rule of appearance.rules. If you mount the card form yourself with @flopay/js, use setShowCardFieldLabels and setCardFieldLabels.

What changed

What you need to do

Nothing, unless you want labels. Merchants who do not set the props see no change.

The props and the label styles need @flopay/react 1.19.0 or newer, and the methods need @flopay/js 1.19.0 or newer. See Show labels above the card fields for an example and the default text of each label, and Style the card field labels for the range of each style.