CheckoutPro
Three-step checkout with shipping choice, card entry, promo codes and order summary.
What's inside
- Details, shipping, payment
- Live card preview
- Promo codes
- Order confirmation
When to use
- Stores and SaaS purchases where you control the checkout UI.
When not to use
- If your provider offers hosted checkout, prefer it for card handling.
Installation
Usage
Import it from @/components/blocks/checkout after installing. It ships with sample data, so it renders straight away; swap in your own data when you're ready.
import { Checkout } from "@/components/blocks/checkout";
export default function Page() {
return (
<main className="mx-auto max-w-6xl p-6">
<Checkout />
</main>
);
}API reference
Checkout
A three-step checkout (details, shipping, payment) with an order summary, promo codes, validation and a confirmation state. Also the default export. No props: sample data sits at the top of the file, ready to swap for your own.
No props.
Keyboard interactions
| Keys | Action |
|---|---|
| Tab | Move through fields |
| Enter | Continue (on the button) |
| ←or→ | Choose shipping |
Accessibility
- Steps use the stepper with aria-current; errors use role="alert".
- Shipping options are a radio group.
Motion
- Steps slide in the direction you move; discounts animate into the summary; confirmation pops.
Responsive behavior
- The summary moves below the form under 1024px.
Performance
- Sample data is plain arrays at the top of the file. Replace them with your API data and keep the shapes.
Notes for AI
- Send card data only to your payment provider; demo code: WELCOME15, test card 4242 4242 4242 4242.
This page as Markdown, for assistants and coding agents:
/blocks/checkout/markdownThe full library index for assistants is at /llms.txt.
Lode222 doc pagesllms.txt