#chukd
1 messages · Page 1 of 1 (latest)
Hi there. What's the issue you're facing?
I can't get floating labels to float! Here is a Stackoverflow I posted - https://stackoverflow.com/q/75625511/1186050 and my Stackblitz showing all the working code - https://stackblitz.com/edit/angular-dwmaya?file=src/test/stripe/stripe.component.ts
I'd like to style my Stripe.js elements (card number, Cvc, Expiry) with floating labels, to be consistent with my other bootstrap floating labels I'm using ngx-stripe as a wrapper around Stripe.js....
maybe you can help? IDK!
So that code looks like it's just the bootstrap forms
Do you have a sample with Elements that isn't working as expected?
yes, I am using bootstrap forms (w/ floating labels). This Stackblitz showing working code - https://stackblitz.com/edit/angular-dwmaya?file=src/test/stripe/stripe.component.tshttps://stackblitz.com/edit/angular-dwmaya?file=src/test/stripe/stripe.component.ts
No I need to see the code that isn't working
I need to see your Stripe Elements code that you said doesn't work as expected
Not bootstrap code
I'm not sure I understand your question. The Stackblitz link has non working code in it. I just updated it to show a name field at the top that has floating labels that work and all the Stripe fields below are not working. Did you want something else in terms of code?
👋 hopping in here - give me a minute to catch up
sure, no problem
Hmm... Let me try some things - I don't actually know if you can do floating labels with the Card Element
oh ok, let me know if you can figure something out?
Have you looked at these samples before? https://github.com/stripe/elements-examples/#example-2
It's the second one from here: https://stripe.dev/elements-examples/
I saw those but the code and CSS are long and nightmarish.
As far as I know, that's the only way to do it - what you've tried (with passing in appearance: { labels: 'floating' } ) won't work because it's not supported with the CardElement
oh ok.
what about Iban?
and where did you find that says the CardElement isn't supported?
It says it's not supported right here: https://stripe.com/docs/elements/appearance-api
The Elements Appearance API doesn’t support individual payment method Elements (such as CardElement). Use the Style object to customize your Element instead.