#julio-guzmn_code
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1311043125917253716
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, with CardElements, you would want to use the Style object: https://docs.stripe.com/js/appendix/style to customize it.
You would use the Apperance API, https://docs.stripe.com/elements/appearance-api for PaymentElements for instance.
Thank you. I currently use the "@stripe/stripe-js" library. I reviewed the documentation and it looks like this:
this.stripe = await loadStripe(KEY);
this.elements = this.stripe.elements({ appearance });
this.card = this.elements.create('card') as StripeCardElement;
this.card.mount('#card-element');
Is it necessary to modify code to avoid obtaining the horizontal form? (evidence attached)
Ah nice! My old Card Elements integration uses the Style object. I should have tested before.
Wait, we do pint this out here: https://docs.stripe.com/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.
All right! But still continues in horizontal view... I use Angular 17 with TS. Its any difference between Angular and use JS script?
This is expected. If you want to control this even further, you could use the Split CardElements, https://docs.stripe.com/js/element/other_element?type=cardNumber for instance for a card number.
Ok, thank you