#jeremy-cardelement-style
1 messages · Page 1 of 1 (latest)
jeremy-cardelement-style
yes you can style a lot of it, see https://stripe.com/docs/js/appendix/style
I do recommend using our PaymentElement UI instead, it's more recent and way more powerful, see https://stripe.com/docs/payments/payment-element
So is there a way of making text labels appear above each of the fields?
If you use the default CardElement then no, it's a single line input element and you can't control its exact layout. But there's a way to split each field in separate elements yes.
But again you really really should just switch to PaymentElement and ignore the CardElement entirely
Hmm - will that require a big rewrite of my Javascript code though? Also, in my client's application, they only want to offer the chance for the customer to enter card details - so we'd need to prevent it showing Apple Pay and so forth...
Most businesses think that, but then they regret it. I'm really curious why a business would actively want to prevent real customers from paying quickly with Apple Pay for example
Ultimately, you can do what you want with split fields. See example 3 here https://stripe.dev/elements-examples/ for example
Thank you. 🙂