Payment flow diagram
ProA diagram of a payment passing from checkout through to settlement.
pnpm dlx shadcn@latest add @caliper/payment-flow-diagram- 1Customer to Checkout: Pay $48.00
- 2Checkout to Gateway: Create charge
- 3Gateway to Card network: Authorize card
- 4Card network to Gateway: Approved
- 5Gateway to Ledger: Record payment
- 6Gateway to Checkout: Charge succeeded
- 7Checkout to Customer: Show receipt
Press Play or Step to run the payment.
When to use #
Use it for
- Explaining how money moves in a product.
- Showing the states of a payment.
Skip it when
- The audience needs a legal description.
Installation #
pnpm dlx shadcn@latest add @caliper/payment-flow-diagram
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage #
Import it from your copy of the source. The example behind the preview comes with the source.
import { PaymentFlowDiagram } from "@/components/ui/payment-flow-diagram"
The worked example comes with Pro
The 31-line example behind the preview opens here with a Pro or Team licence.
API reference #
PaymentFlowDiagram
component
Accessibility #
It exposes region and status semantics, with aria-hidden, aria-label and aria-current kept in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
Motion #
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.