finds.dev← search

// the find

stripe/react-stripe-js

★ 2,043 · TypeScript · MIT · updated Oct 2026

React components for Stripe.js and Stripe Elements

Official React bindings for Stripe.js and Stripe Elements, published as @stripe/react-stripe-js. It wraps the Elements and Checkout lifecycle in providers and hooks, and it is the React path Stripe's own docs point to for a custom checkout page. It is aimed at teams building payment UI in a React app who want Stripe to handle the card and payment-method fields.

The Checkout API is split cleanly: CheckoutElementsProvider takes a clientSecret promise, and useCheckoutElements returns a loading, error, or success union, so components have to handle every state instead of assuming the session is ready. Typings ship with the package, and the Checkout entry point is a separate import path, so you can use it without pulling in the legacy Elements components. The examples directory has Storybook stories for most payment surfaces (card, split card, IBAN, Payment Element, Embedded Checkout), which is more useful than a bare API table. docs/migrating.md covers the move from react-stripe-elements, so existing code has a written upgrade path.

The package does not accept external pull requests, so a bug or missing feature waits on Stripe's release schedule, and forking is the only fast option. The README says React 16.8 is the minimum, but its Checkout example uses createRoot from react-dom/client, which needs React 18, so the stated floor is misleading for anyone on 16 or 17. This is a thin wrapper: the typings and most of the behaviour come from @stripe/stripe-js, so both packages have to be upgraded together, and debugging usually ends at Stripe's external docs or the hosted js.stripe.com script rather than anything in this repo.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →