Payment methods
The cards on an account and a form to add one: brand detected as you type, the number checked before sending, expiry warnings, a bank confirmation step, and a default that cannot be removed by accident.
Payment methods
- Visa ending 4242Expires 08/28Default
- Mastercard ending 4444Expires 11/26 · update it before then
When to use
- Billing settings.
- Any account that keeps a card on file.
When not to use
- A one-off checkout; use the checkout form.
Installation
pnpm dlx shadcn@latest add @caliper/payment-methods
Adds its 11 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.
API reference
cardBrand
0 props
No props of its own; it accepts the native props of its root element.
luhn
0 props
No props of its own; it accepts the native props of its root element.
PaymentMethods
8 props
Keyboard
- Keyboard and focus come from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
Accessibility
It exposes group, alert and status semantics, with aria-hidden, aria-labelledby, aria-label and aria-disabled kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/payment-methods.mdThe index of every part is at /llms.txt.