Radio
Payment Method
NewA checkout choice of payment methods as cards under each other, with Apple Pay, Google Pay, card, PayPal and bank marks.
npx motionsnack add payment-methodCustomize
<PaymentMethod />Props
15 properties
| Property | Type | Default | Description |
|---|---|---|---|
| methods | { id: string; label: string; description?: string; logos?: ('applepay' | 'googlepay' | 'visa' | 'mastercard' | 'amex' | 'paypal' | 'bank' | 'klarna')[]; details?: string; disabled?: boolean }[] | Apple Pay, Google Pay, Card, PayPal, Bank transfer | The payment methods, top to bottom, with the brand marks shown at the right. |
| value | string | - | Chosen method id (controlled). |
| onChange | (id: string, option?: PaymentMethodOption) => void | - | Called with the id of the method the visitor picks, and the method. |
| name | string | generated | Name of the radios, sent with a form. |
| id | string | generated | Id prefix of the radios. |
| className | string | '' | Extra classes on the fieldset. |
| label | string | 'Payment method' | Legend above the methods. Empty hides it. |
| description | string | 'All payments are encrypted and secure.' | Line under the legend. Empty hides it. |
| defaultValue | 'applepay' | 'googlepay' | 'card' | 'paypal' | 'bank' | '' | 'applepay' | Method chosen at first render. |
| variant | 'stack' | 'joined' | 'stack' | Separate cards with a gap, or one box with hairline dividers. |
| helperText | string | '' | Small text under the methods. Empty hides it. |
| error | string | '' | Error message. Any text colours the unchecked circles' edge and replaces the helper text. |
| required | boolean | false | Marks the choice as required. |
| disabled | boolean | false | Disables every method. |
| errorColor | string | '' | Overrides the per-theme error colour. Empty uses the theme pair. |
About Payment Method
Payment Method is the step of a checkout where people pick how to pay. Each method sits on its own card under the one before: a radio circle on the left, the name and a short line under it, and the brand marks on small white chips at the right, the way checkout pages show them, for Apple Pay, Google Pay, Visa, Mastercard, Amex, PayPal and Klarna, with a plain line icon for a bank transfer. The chosen card gets a full-contrast border, its dot scales in and a line of detail opens smoothly inside it, such as a note that the payment is confirmed with Face ID, while the other cards fold theirs away. The methods can stand as separate cards or share one box with hairline dividers. Underneath are real radios, so arrow keys, forms and screen readers work as usual, and the group shares the library's legend, helper text, error state and soft focus outline.
What's included
- Method cards with brand marks on white chips
- Apple Pay, Google Pay, Visa, Mastercard, Amex, PayPal, Klarna and bank
- Details that open inside the chosen card
- Separate cards or one joined box
- Native radios: arrow keys, forms, screen readers
- Legend, helper text, error and disabled methods
- Light and dark look
- Type
- Animated React radio component
- Library
- Components · Radio
- Stack
- Next.js, React, Tailwind CSS