Preview:
import React from 'react'
import { CardElement, Elements, StripeProvider } from '@stripe/react-stripe-js'
import { loadStripe } from '@stripe/stripe-js'

const stripePromise = loadStripe('<YOUR_STRIPE_PUBLISHABLE_KEY>')

const PaymentForm = () => {
  return (
    <CardElement />
  )
}

const App = () => {
  return (
    <StripeProvider stripe={stripePromise}>
      <Elements>
        <PaymentForm />
      </Elements>
    </StripeProvider>
  )
}

export default App
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter