Stripe Elements Appearance API basics

Поделиться
HTML-код
  • Опубликовано: 7 июл 2024
  • In this episode, you'll learn the basics for working with the Appearance API to style the PaymentElement. You can pick a theme, then customize specific variables, and ultimately define custom rules to design your Payment Element to match your brand.
    Presenter
    CJ Avilla - Developer Advocate at Stripe - / cjav_dev
    Table of contents
    00:00 Introduction
    02:08 Apply a theme
    06:45 Apply rules
    08:03 Form input configuration options
    08:45 Conclusion
    Resources
    Elements Appearance API stripe.com/docs/stripe-js/app...
    Support
    If you have a question, please feel free to reach out to our support team on Discord at stripe.com/go/developer-chat
    Updates
    Sign up to stay updated with developer news: go.stripe.global/dev-digest
    Feedback
    If you have any feedback about this or other episodes, let us know: forms.gle/VjNqzRhotM2snYo88
    #stripe #elements

Комментарии • 13

  • @Anthony-ke8bm
    @Anthony-ke8bm Год назад

    why do your examples say to store clientSecret retrieved from creating a paymentIntent in state...
    either naming the value a secret was a poor decision or it doesnt matter if it is exposed to the browser. or whoever made the documentation made the assumption that the reader knows not to store sensitive info in state?
    lots of questions here , rest of the docs were great though for the most part. got everything set up pretty quickly

  • @connerleverett9860
    @connerleverett9860 2 года назад

    Thanks for the great demo! Is there a plan to support individual payment method Elements (such as CardElement) ?

    • @StripeDev
      @StripeDev  2 года назад

      Hi Conner-just to check in, are you wanting to be able to use the Appearance API for these other Elements?

    • @connerleverett9860
      @connerleverett9860 2 года назад

      @@StripeDev I was hoping to! But I saw in the documentation that "The Elements Appearance API doesn’t support individual payment method Elements (such as CardElement). Use the Style object to customize your Element instead". I'm new to Stripe but I'm finding it a bit harder to style individual elements (especially if you want to style the element container as then you have to mount the component instead of just rendering a component).
      Edit: Just found the `options` prop on the CardElement which allows all of the styling so I can render that!

    • @StripeDev
      @StripeDev  2 года назад

      Hm, there might be some confusion with how individual Elements are styled compared to the newer Elements.
      With previous individual payment Elements, you need to style the you are rendering the in. The style object mostly helps you color text across various states (base, error, etc.).

    • @connerleverett9860
      @connerleverett9860 2 года назад

      @@StripeDev Cool, thanks for the quick feedback!

  • @alifarooq5718
    @alifarooq5718 Год назад

    how to make second tab active when modal open..??

    • @StripeDev
      @StripeDev  Год назад

      Hi Ali! 👋 We'd love to help you out here, but we're not too sure about your question. Would you mind clarifying for us?

  • @ol1175
    @ol1175 Год назад +1

    How can I style the payment element in React?

  • @juliojean-simon4364
    @juliojean-simon4364 2 года назад

    Hi 😊
    How are you doing today