r/reactjs • u/Little-Frosting2156 • 7d ago
Show /r/reactjs Claude and I built a Shopify-style one-page checkout in React, with every component usable on its own (MIT)
I needed a good checkout for a site that isn't on Shopify, and I think Shopify's one-page checkout is the best one out there. So Claude and I rebuilt the design in React, and I open-sourced it.
Demo: https://gurfi1.github.io/react-shopify-style-checkout/
Repo: https://github.com/gurfi1/react-shopify-style-checkout
What's in it
- The whole checkout as one
<Checkout>component: contact, address with autocomplete, shipping rates, payment methods, discount codes, order summary, and the thank-you page. - Around 40 components you can take one at a time. Each lives in its own folder with a stylesheet, a live demo and a README that lists what else it needs.
- The behaviour as hooks (
useCheckout,useShippingRatesand others) if you want the logic with your own UI. - Right-to-left support, with a Hebrew locale included. Add
?lang=heto the demo to see it.
How it's built
React 19, TypeScript, CSS Modules, and design tokens as CSS variables. No UI library and no runtime dependencies besides React. There's no npm package yet: you copy the folders you want, or use the repo as a template.
You connect it to your back end through four functions: suggestAddresses, shippingRates, applyDiscount and placeOrder. The demo runs on canned data.
What it is not
- It doesn't take payments. The card fields are placeholders that you swap for your provider's hosted fields.
- It has no cart, tax or inventory logic. That belongs on your server.
- It isn't affiliated with Shopify and contains none of their code. We measured the design and the motion from the real thing and wrote it from scratch.
How it was made
I used Claude Code to build it. I made the product and design decisions and reviewed the result, and Claude wrote most of the code and the docs. Every commit is co-authored, so the history shows it.
Not tested yet
Firefox and screen readers. The automated accessibility scan is clean and keyboard-only works, but that isn't the same as a real screen-reader pass. The docs list the known gaps.
Feedback I'm after
I'd most like to hear whether the component boundaries make sense and whether the api contract would fit a real back end. Issues and PRs are welcome, and so are test reports from Firefox and from screen-reader users.