#cho_best-practices
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/1219374795733602370
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- cho_best-practices, 5 days ago, 14 messages
Hello, my goal is to change the look and feel, but I'm having difficulty with modifying the elements themselves. I see how to disable the collection of certain fields, but I am lost when trying to configure the look & feel more.
I wish to put the card #, CVC, and expiry date in one input-line, and I wanted some guidance on how I can do that
I use react-js, so I am creating a payment element like so:
Hello, does this doc help? https://docs.stripe.com/elements/appearance-api
For the payment element you will create an appearance object and then pass that in to the overall elements object when creating it
I saw this one as well, but it seemed to be more the thematics and font
I didn't see anything that supported changing the layout of the inputs
Is there a segment I looked over?
I'll try passing an appearance object to the payment element when I create it. Will that appearance object hold the keys to combining card#/CVC/Expiry date?
For layouts I think we only support changing between the predefined tabs or accordion layouts https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-layout
I don't think the appearance API allows CSS that will fundamentally change the layout unfortunately
there is an example of a stripe checkout here that has what I mentioned. How did they accomplish this?
That looks like they are using our Card element and Payment Request Button rather than our Payment Element. Lookinf for the docs on these
Card element: https://docs.stripe.com/payments/card-element
Payment request button: https://docs.stripe.com/stripe-js/elements/payment-request-button